mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2025-12-23 10:11:54 +00:00
* Upgrade TypeScript, ESLint, and other dependencies This also cleans up various other files where newer ESLint rules complained * Set CI and CD to use Node.js version 16 * Small tweak * Fix CD version printing * Add nvm version for Cloudflare Pages
72 lines
1.6 KiB
YAML
72 lines
1.6 KiB
YAML
name: Continuous Integration
|
|
|
|
on:
|
|
push:
|
|
branches: [ master ]
|
|
|
|
pull_request:
|
|
branches: [ master ]
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: 🔧 Set up Node
|
|
uses: actions/setup-node@v1
|
|
with:
|
|
node-version: '16.x'
|
|
|
|
- name: 🚧 Install Node dependencies
|
|
run: cd frontend && npm install
|
|
|
|
- name: 🔼 Update Rust to latest stable
|
|
run: rustc --version && rustup update stable && rustc --version
|
|
|
|
- name: 📦 Install cargo-about
|
|
run: cargo install cargo-about
|
|
|
|
- name: 🌐 Build Graphite web code
|
|
run: cd frontend && npm run build
|
|
|
|
- name: 👕 Lint Graphite web formatting
|
|
run: export NODE_ENV=production && cd frontend && npm run lint
|
|
|
|
- name: 🔬 Check Rust formatting
|
|
run: cargo fmt --all -- --check
|
|
|
|
- name: 🦀 Build Rust code
|
|
run: cargo build --verbose
|
|
|
|
- name: 🧪 Run Rust tests
|
|
run: cargo test --verbose
|
|
|
|
cargo-deny:
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
matrix:
|
|
checks:
|
|
- 'crate security advisories'
|
|
- 'crate license compatibility'
|
|
|
|
# Prevent sudden announcement of a new advisory from failing ci:
|
|
continue-on-error: ${{ matrix.checks == 'crate security advisories' }}
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: EmbarkStudios/cargo-deny-action@v1
|
|
if: matrix.checks == 'crate security advisories'
|
|
with:
|
|
command: check advisories
|
|
|
|
- uses: EmbarkStudios/cargo-deny-action@v1
|
|
if: matrix.checks == 'crate license compatibility'
|
|
with:
|
|
command: check bans licenses sources
|