Merge pull request #1 from pastebinrun/github-workflow

Create GitHub Workflow
This commit is contained in:
Konrad Borowski 2022-05-28 19:21:13 +02:00 committed by GitHub
commit 0b27082a08
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

55
.github/workflows/ci.yml vendored Normal file
View File

@ -0,0 +1,55 @@
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:
- 1.56
- 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