on main help sign in
Use prebuilt cargo Github action
eeb20f6fabianlindfors
.github/workflows/release.yaml+6−1
@@ -20,7 +20,12 @@ jobs:
20 - name: Use cache for Rust dependencies
20 - name: Use cache for Rust dependencies
21 uses: Swatinem/rust-cache@v1
21 uses: Swatinem/rust-cache@v1
22 - name: Build
22 - name: Build
23+ uses: actions-rs/cargo@v1
24+ with:
25+ command: build
26+ args: --release
27+ - name: Rename binary
23− run: cargo build --release && mv target/release/reshape ./reshape-linux_amd64
28+ run: mv target/release/reshape ./reshape-linux_amd64
24 - name: Save binary to release
29 - name: Save binary to release
25 uses: skx/github-action-publish-binaries@master
30 uses: skx/github-action-publish-binaries@master
26 env:
31 env:
.github/workflows/test.yaml+4−1
@@ -37,6 +37,9 @@ jobs:
37 - name: Use cache for Rust dependencies
37 - name: Use cache for Rust dependencies
38 uses: Swatinem/rust-cache@v1
38 uses: Swatinem/rust-cache@v1
39 - name: Run integration tests
39 - name: Run integration tests
40+ uses: actions-rs/cargo@v1
41+ with:
42+ command: test
40− run: cargo test -- --test-threads=1
43+ args: -- --test-threads=1
41 env:
44 env:
42 POSTGRES_CONNECTION_STRING: "postgres://postgres:postgres@127.0.0.1/migra_test"
45 POSTGRES_CONNECTION_STRING: "postgres://postgres:postgres@127.0.0.1/migra_test"