80 lines
2.4 KiB
YAML
80 lines
2.4 KiB
YAML
# SPDX-FileCopyrightText: 2026 Stan Grams <sjg@haxx.space>
|
|
#
|
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
# CI for the self-hosted, host-executor Podman runners (see container/).
|
|
# The runner image bakes in the Rust toolchain and all build dependencies,
|
|
# so jobs go straight to cargo — no apt/rustup setup steps (which also
|
|
# collided on the dpkg lock when jobs ran concurrently in the same runner).
|
|
|
|
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
|
|
jobs:
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: rustfmt
|
|
run: cargo fmt --all -- --check
|
|
- name: clippy
|
|
run: cargo clippy --workspace --all-targets --all-features -- -D warnings
|
|
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Build
|
|
run: cargo build --workspace --all-targets --locked
|
|
- name: Test
|
|
run: cargo test --workspace --locked
|
|
|
|
frontend:
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: src/trx-client/trx-frontend/trx-frontend-http/frontend
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Cache npm downloads
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: ~/.npm
|
|
key: npm-${{ runner.os }}-${{ hashFiles('src/trx-client/trx-frontend/trx-frontend-http/frontend/package-lock.json') }}
|
|
restore-keys: |
|
|
npm-${{ runner.os }}-
|
|
- name: Install locked frontend dependencies
|
|
run: npm ci
|
|
- name: Type-check
|
|
run: npm run typecheck
|
|
- name: Lint
|
|
run: npm run lint
|
|
- name: Test
|
|
run: npm test
|
|
- name: Install browser smoke dependency
|
|
run: command -v chromium >/dev/null || (sudo apt-get update && sudo apt-get install -y --no-install-recommends chromium)
|
|
- name: Browser smoke test
|
|
run: npm run test:browser
|
|
- name: Verify generated assets
|
|
run: npm run verify-generated
|
|
- name: Verify generated-file licensing
|
|
working-directory: .
|
|
run: reuse lint
|
|
|
|
reuse:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: REUSE compliance
|
|
# `reuse` CLI instead of fsfe/reuse-action: the latter is a Docker
|
|
# action, which the host-executor runners cannot run. `reuse` is baked
|
|
# into the runner image (see container/Containerfile).
|
|
run: reuse lint
|