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.
This commit is contained in:
fabianlindfors 2021-12-29 00:35:03 +01:00
parent 7e64cc488d
commit eeb20f6ce0
2 changed files with 10 additions and 2 deletions

View File

@ -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:

View File

@ -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"