Github Actions to build and test PRs #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Rust | ||
on: | ||
push: | ||
branches: ["main"] | ||
pull_request: | ||
branches: ["main"] | ||
env: | ||
CARGO_TERM_COLOR: always | ||
jobs: | ||
checkout: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Run unit tests | ||
run: cargo test --verbose | ||
build: | ||
runs-on: ubuntu-latest | ||
needs: checkout | ||
steps: | ||
- name: Build | ||
run: cargo build --verbose | ||
install-tooling: | ||
runs-on: ubuntu-latest | ||
needs: [checkout, build] | ||
steps: | ||
- name: Install tooling | ||
run: sudo apt-get install -y cmake ninja-build clang-format | ||
- name: Install yarn | ||
run: cargo xtask bootstrap yarn | ||
lint: | ||
runs-on: ubuntu-latest | ||
needs: [checkout, install-tooling] | ||
steps: | ||
- name: Check format | ||
run: cargo xtask fmt --check | ||
unit-tests: | ||
runs-on: ubuntu-latest | ||
needs: [checkout, build] | ||
steps: | ||
- name: Run tests | ||
run: cargo test --verbose | ||
integration-test: | ||
runs-on: ubuntu-latest | ||
needs: [build, tooling] | ||
steps: | ||
- name: Run Bootstrap | ||
run: cargo xtask bootstrap | ||
- name: Run tests of generated bindings | ||
run: ./scripts/run-tests.sh |