Skip to content

Release

Release #1124

Workflow file for this run

name: Lint
on:
push:
branches:
- main
pull_request:
jobs:
lint:
name: Lint SourceCode
runs-on: ubuntu-latest
container:
image: ghcr.io/brooooooklyn/canvas/ubuntu-builder:jammy
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 18
cache: 'yarn'
- name: Output toolchain
id: toolchain
shell: bash
run: echo "version=$(cat ./rust-toolchain)" >> "$GITHUB_OUTPUT"
- name: Install
uses: dtolnay/rust-toolchain@stable
with:
targets: x86_64-apple-darwin
toolchain: ${{ steps.toolchain.outputs.version }}
components: clippy, rustfmt
- name: Cache cargo registry
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
key: lint-cargo-cache
- name: Install dependencies
run: yarn install --immutable --mode=skip-build
- name: Download skia binary
run: |
git config --global --add safe.directory $(pwd)
node ./scripts/release-skia-binary.js --download
- name: 'Lint JS/TS'
run: yarn lint
- name: Cargo fmt
run: cargo fmt -- --check
- name: Clippy
run: cargo clippy