Skip to content

Commit

Permalink
needs test
Browse files Browse the repository at this point in the history
  • Loading branch information
lens0021 committed Dec 17, 2024
1 parent 86557db commit 1395043
Showing 1 changed file with 35 additions and 11 deletions.
46 changes: 35 additions & 11 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,39 @@ env:
CARGO_TERM_COLOR: always

jobs:
build_and_test:
build:
name: Rust build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# - uses: awalsh128/cache-apt-pkgs-action@latest
# with:
# packages: bc shfmt
# version: 1.0
# - name: Install bshchk
# run: |
# sudo curl https://github.com/b1ek/bshchk/releases/download/1.1/bshchk.linux.amd64 -L -o /usr/bin/bshchk
# sudo chmod +x /usr/bin/bshchk
- uses: dtolnay/rust-toolchain@stable
- name: Cache dependencies installed with cargo
uses: actions/cache@v4
with:
path: |
./target/deps
~/.cargo
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-
- name: Build binary
# the binary will be used by the next cargo test step
run: cargo build --tests
- uses: actions/upload-artifact@v4
with:
name: target
path: target/
test:
name: Rust tests
runs-on: ubuntu-latest
needs: build
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -60,17 +90,11 @@ jobs:
sudo curl https://github.com/b1ek/bshchk/releases/download/1.1/bshchk.linux.amd64 -L -o /usr/bin/bshchk
sudo chmod +x /usr/bin/bshchk
- uses: dtolnay/rust-toolchain@stable
- name: Cache dependencies installed with cargo
uses: actions/cache@v4
- name: Download a single artifact
uses: actions/download-artifact@v4
with:
path: |
./target/deps
~/.cargo
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-
- name: Build binary
# the binary will be used by the next cargo test step
run: cargo build
name: target
path: target
- name: Run cargo tests
env:
AMBER_TEST_STRATEGY: docker
Expand Down

0 comments on commit 1395043

Please sign in to comment.