tmp #154
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: Watchdogs | |
on: [push, pull_request] | |
env: | |
TERM: xterm | |
CARGO_TERM_COLOR: always | |
RUSTFLAGS: -D warnings | |
RUST_BACKTRACE: 1 | |
defaults: | |
run: | |
working-directory: v2 | |
jobs: | |
unit-test: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest, macos-13] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
components: clippy | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
workspaces: v2 -> v2/target | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 'lts/*' | |
cache: npm | |
cache-dependency-path: v2/package-lock.json | |
- run: sudo bash ./scripts/install_apt_deps.bash | |
if: ${{ matrix.os == 'ubuntu-latest' }} | |
- run: npm ci | |
- run: npm run bundle | |
- run: cargo clippy --all --all-features --benches --tests -- -D warnings | |
- run: cargo test | |
- run: cargo clippy -- -D warnings | |
working-directory: v2/fuzz | |
sanity-test: | |
needs: unit-test | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest, macos-13] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
workspaces: v2 -> v2/target | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 'lts/*' | |
cache: npm | |
cache-dependency-path: v2/package-lock.json | |
- run: sudo bash ./scripts/install_apt_deps.bash | |
if: ${{ matrix.os == 'ubuntu-latest' }} | |
- run: npm ci | |
- run: make release | |
- run: xvfb-run cargo run --release --features=__sanity -- --debug | |
if: ${{ matrix.os == 'ubuntu-latest' }} | |
- run: cargo run --release --features=__sanity -- --debug | |
if: ${{ matrix.os != 'ubuntu-latest' }} | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
# Clippy runs on each platforms in `test` job | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
components: rustfmt | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
workspaces: v2 -> v2/target | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 'lts/*' | |
cache: npm | |
cache-dependency-path: v2/package-lock.json | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3' | |
- run: pip install yamllint | |
- run: sudo bash ./scripts/install_apt_deps.bash | |
- run: npm ci | |
- run: npm run lint:web | |
- run: cargo fmt --all --check | |
- run: shellcheck ./scripts/gen_macos_app.bash ./scripts/gen_macos_dmg.bash ./scripts/install_apt_deps.bash | |
- run: yamllint --strict ./src/assets/default_config.yml |