From 983dff2c129d79c0c0ef1733cab56028e49d46a2 Mon Sep 17 00:00:00 2001 From: Anush Date: Tue, 10 Oct 2023 22:43:16 +0530 Subject: [PATCH] ci: test before release (#4) * ci: release needs test * chore: remove local_cache from test.yml cache --- .github/workflows/release.yml | 20 ++++++++++++++++++++ .github/workflows/test.yml | 3 +-- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fe36500..98c5424 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,8 +9,28 @@ on: env: CARGO_TERM_COLOR: always jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - 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: Run tests + run: cargo test + release: runs-on: ubuntu-latest + needs: + - test steps: - name: "☁️ checkout repository" uses: actions/checkout@v3 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8717f42..02b4eca 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -23,8 +23,7 @@ jobs: ~/.cargo/registry/cache/ ~/.cargo/git/db/ target/ - local_cache/ key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - name: Run tests - run: cargo test \ No newline at end of file + run: cargo test