From 2e58861bac67f4774f5f3c25bc5ba1eec7388064 Mon Sep 17 00:00:00 2001 From: Macpie Date: Mon, 6 May 2024 20:24:29 -0700 Subject: [PATCH] Release in own step --- .github/workflows/test.yml | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 81ff92512..9fa7e1635 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -45,7 +45,7 @@ jobs: key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - name: Build - run: cargo build --all --release --tests + run: cargo build --all --tests fmt: needs: build @@ -158,4 +158,35 @@ jobs: - name: Run unit and integration tests env: DATABASE_URL: "postgres://postgres:postgres@localhost:5432/postgres" - run: cargo test -r -p ${{ matrix.package }} -- --include-ignored \ No newline at end of file + run: cargo test -r -p ${{ matrix.package }} -- --include-ignored + release: + needs: build + runs-on: oracles-20.04 + concurrency: + group: ${{ github.workflow }}-${{ github.ref }}-clippy + 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 \ No newline at end of file