From eeb20f6ce0c8b775dc433e8007764aed6f20b88a Mon Sep 17 00:00:00 2001 From: fabianlindfors Date: Wed, 29 Dec 2021 00:35:03 +0100 Subject: [PATCH] Use prebuilt cargo Github action This makes no difference right now but will make it easier to add cross-compilation later as the cargo Github action has built-in support for `cross`: https://github.com/actions-rs/cargo. --- .github/workflows/release.yaml | 7 ++++++- .github/workflows/test.yaml | 5 ++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 02faaf4..e69bd21 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -20,7 +20,12 @@ jobs: - name: Use cache for Rust dependencies uses: Swatinem/rust-cache@v1 - name: Build - run: cargo build --release && mv target/release/reshape ./reshape-linux_amd64 + uses: actions-rs/cargo@v1 + with: + command: build + args: --release + - name: Rename binary + run: mv target/release/reshape ./reshape-linux_amd64 - name: Save binary to release uses: skx/github-action-publish-binaries@master env: diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index e0af804..7ad141a 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -37,6 +37,9 @@ jobs: - name: Use cache for Rust dependencies uses: Swatinem/rust-cache@v1 - name: Run integration tests - run: cargo test -- --test-threads=1 + uses: actions-rs/cargo@v1 + with: + command: test + args: -- --test-threads=1 env: POSTGRES_CONNECTION_STRING: "postgres://postgres:postgres@127.0.0.1/migra_test" \ No newline at end of file