use es2022
TypeScript compile target
#48
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: | |
test: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
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 --benches --tests -- -D warnings | |
- run: cargo test | |
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@v4 | |
with: | |
python-version: '3' | |
- run: pip install yamllint | |
- run: sudo bash ./scripts/install_apt_deps.bash | |
- run: npm ci | |
- run: npm run lint:tsc | |
- run: npm run lint:prettier | |
- run: npm run lint:eslint | |
- run: npm run lint:stylelint | |
- run: cargo fmt --all --check | |
- run: shellcheck ./scripts/gen_macos_app.bash ./scripts/install_apt_deps.bash | |
- run: yamllint --strict ./src/assets/default_config.yml |