Skip to content

Commit

Permalink
github: Fix CI by installing trunk and building frontend first
Browse files Browse the repository at this point in the history
  • Loading branch information
joaoantoniocardoso committed Oct 15, 2024
1 parent 97bf8f3 commit 8393b59
Showing 1 changed file with 22 additions and 5 deletions.
27 changes: 22 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,30 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable

- name: Install build dependencies - Rustup
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain stable --profile minimal --target x86_64-unknown-linux-musl wasm32-unknown-unknown -y
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: Check code style
run: cargo fmt -- --check
- name: Build
run: cargo build --verbose
- name: Test
run: cargo test --verbose -- --nocapture

- name: Install build dependencies - Cargo-Binstall
uses: cargo-bins/cargo-binstall@main

- name: Install build dependencies - Trunk
run: cargo binstall -y trunk

- name: Building frontend (wasm32)
working-directory: src/webpage
run: trunk build --release --locked --verbose

- name: Building tests
run: SKIP_FRONTEND=1 cross test --no-run --locked --verbose

- name: Run Tests
run: SKIP_FRONTEND=1 cargo test --verbose -- --nocapture

build:
runs-on: ${{ matrix.os }}
Expand Down

0 comments on commit 8393b59

Please sign in to comment.