Skip to content

Commit

Permalink
Use actions/cache@v4 & remove release in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
macpie committed May 7, 2024
1 parent f53f837 commit 72cc91f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 38 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-build-release
cancel-in-progress: true
if: ${{ github.event.workflow_run.conclusion == 'success' }} && contains(github.ref, 'refs/tags/')
if: ${{ github.event.workflow_run.conclusion == 'success' }} && contains(github.ref, 'refs/tags/')
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
Expand All @@ -34,7 +34,7 @@ jobs:
run: sudo apt-get install -y protobuf-compiler

- name: Cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
Expand Down
41 changes: 5 additions & 36 deletions .github/workflows/Tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
run: sudo apt-get install -y protobuf-compiler

- name: Cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
Expand Down Expand Up @@ -66,7 +66,7 @@ jobs:
run: sudo apt-get install -y protobuf-compiler

- name: Cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
Expand Down Expand Up @@ -97,7 +97,7 @@ jobs:
run: sudo apt-get install -y protobuf-compiler

- name: Cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
Expand Down Expand Up @@ -145,7 +145,7 @@ jobs:
run: sudo apt-get install -y protobuf-compiler

- name: Cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
Expand All @@ -158,35 +158,4 @@ jobs:
- name: Run unit and integration tests
env:
DATABASE_URL: "postgres://postgres:postgres@localhost:5432/postgres"
run: cargo test -p ${{ matrix.package }} -- --include-ignored
release:
needs: build
runs-on: oracles-20.04
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-release
cancel-in-progress: true
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Rust install
uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt

- name: Install protoc
run: sudo apt-get install -y protobuf-compiler

- name: Cache
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- name: Build
run: cargo build --all --release
run: cargo test -p ${{ matrix.package }} -- --include-ignored

0 comments on commit 72cc91f

Please sign in to comment.