forked from 1b-agent/opencadstudio-upstream
Co-authored-by: dichhead <330471626+dichhead@users.noreply.github.com>
55 lines
1.5 KiB
YAML
55 lines
1.5 KiB
YAML
name: CI
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches: [main]
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: ci-${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
flake:
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: ./.github/actions/setup-nix
|
|
- name: Run flake checks
|
|
run: nix flake check --print-build-logs
|
|
|
|
rust:
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: ./.github/actions/setup-nix
|
|
- name: Check formatting
|
|
run: nix develop --command cargo fmt --all --check
|
|
- name: Run clippy
|
|
run: nix develop --command cargo clippy --locked --workspace --all-targets -- -D warnings
|
|
- name: Run library tests
|
|
run: nix develop --command cargo test --locked --workspace
|
|
|
|
web:
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: ./.github/actions/setup-nix
|
|
- name: Build web bundle
|
|
run: nix develop --command trunk build --locked --release --public-url /app/ --dist dist/app --html-output index.html web-app.html
|
|
- name: Validate website assembly
|
|
run: nix develop --command python3 scripts/test_site.py
|
|
- name: Validate locale lookups
|
|
run: nix develop --command python3 scripts/test_locales.py
|
|
|
|
release-automation:
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: ./.github/actions/setup-nix
|
|
- name: Test release automation
|
|
run: nix develop --command python3 scripts/test_release.py
|