2022-05-28 15:31:07 +00:00
|
|
|
name: CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
pull_request:
|
|
|
|
|
|
|
|
env:
|
|
|
|
CARGO_TERM_COLOR: always
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build-javascript:
|
|
|
|
name: Build JavaScript
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: actions/setup-node@v3
|
|
|
|
with:
|
|
|
|
node-version: 16
|
|
|
|
- run: npm ci
|
|
|
|
- run: node_modules/.bin/vite build
|
|
|
|
|
|
|
|
test:
|
|
|
|
name: Test
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
toolchain:
|
2022-05-31 14:17:15 +00:00
|
|
|
- "1.60"
|
2022-05-28 15:31:07 +00:00
|
|
|
- stable
|
|
|
|
- beta
|
|
|
|
- nightly
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- run: rustup update ${{ matrix.toolchain }}
|
|
|
|
- run: rustup default ${{ matrix.toolchain }}
|
|
|
|
- run: cargo build --verbose
|
|
|
|
- run: cargo test --verbose
|
|
|
|
|
|
|
|
prettier:
|
|
|
|
name: Prettier
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: actions/setup-node@v3
|
|
|
|
with:
|
|
|
|
node-version: 16
|
|
|
|
- run: npm ci
|
|
|
|
- run: npx prettier --check .
|
|
|
|
|
|
|
|
rustfmt:
|
|
|
|
name: Rustfmt
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- run: cargo fmt --all --check
|
2022-05-28 19:55:49 +00:00
|
|
|
|
|
|
|
codeql:
|
|
|
|
name: CodeQL
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
permissions:
|
|
|
|
security-events: write
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: github/codeql-action/init@v2
|
|
|
|
with:
|
|
|
|
languages: javascript
|
|
|
|
- uses: github/codeql-action/analyze@v2
|