CI / Docker image (push) Successful in 12s
CI / Server (push) Successful in 25s
CI / CLI (push) Successful in 13s
Development image / Development image (push) Successful in 21s
CI / CLI (windows) (push) Successful in 57s
CI / CLI (linux-arm64, static) (push) Successful in 1m37s
Release / Prepare release (push) Successful in 2s
Release / Server (linux-x64) (push) Successful in 53s
Release / CLI (linux-arm64, static) (push) Successful in 1m32s
Release / Docker image (push) Successful in 2m48s
Release / Server (windows-x64) (push) Successful in 6m20s
Release / CLI (windows-x64) (push) Successful in 6m48s
Release / CLI (linux-x64) (push) Successful in 7m8s
Release / Publish release (push) Successful in 1s
Squash the tree into one commit, drop docs/architecture.html, reset the version line to 0.3.0, consolidate the changelog, enable Renovate automerge for non-major updates and add AGENTS.md.
151 lines
4.3 KiB
YAML
151 lines
4.3 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
|
|
jobs:
|
|
server:
|
|
name: Server
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 15
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
|
|
- name: Cache npm
|
|
uses: actions/cache@v6
|
|
with:
|
|
path: ~/.npm
|
|
key: ${{ runner.os }}-npm-${{ hashFiles('package-lock.json', 'client/package-lock.json') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-npm-
|
|
|
|
- name: Install server dependencies
|
|
run: npm ci --no-audit --no-fund
|
|
|
|
- name: Build the web interface
|
|
run: |
|
|
npm ci --no-audit --no-fund --prefix client
|
|
npm run build --prefix client
|
|
|
|
- name: Lint the web interface
|
|
run: npm run lint --prefix client
|
|
|
|
- name: Test the server
|
|
run: npm test
|
|
|
|
cli:
|
|
name: CLI
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 30
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
|
|
- name: Cache cargo
|
|
uses: actions/cache@v6
|
|
with:
|
|
path: |
|
|
~/.cargo/registry
|
|
~/.cargo/git
|
|
cli/target
|
|
key: ${{ runner.os }}-cargo-check-${{ hashFiles('cli/Cargo.lock') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-cargo-check-
|
|
|
|
- name: Check the CLI
|
|
run: cargo check --manifest-path cli/Cargo.toml
|
|
|
|
cli-windows:
|
|
name: CLI (windows)
|
|
runs-on: windows-latest
|
|
timeout-minutes: 30
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
|
|
- name: Install Rust
|
|
shell: powershell
|
|
run: |
|
|
if (Get-Command rustup -ErrorAction SilentlyContinue) {
|
|
rustup show active-toolchain
|
|
} else {
|
|
Invoke-WebRequest https://win.rustup.rs/x86_64 -OutFile rustup-init.exe -UseBasicParsing
|
|
./rustup-init.exe -y --default-toolchain stable --profile minimal
|
|
"$env:USERPROFILE\.cargo\bin" | Out-File -FilePath $env:GITHUB_PATH -Append
|
|
}
|
|
|
|
- name: Report the toolchain
|
|
shell: powershell
|
|
run: |
|
|
rustc --version
|
|
cargo --version
|
|
dotnet --version 2>$null
|
|
if (Get-Command wix -ErrorAction SilentlyContinue) { wix --version }
|
|
|
|
- name: Put Git Bash on PATH
|
|
shell: powershell
|
|
run: |
|
|
"C:\Program Files\Git\bin" | Out-File -FilePath $env:GITHUB_PATH -Append
|
|
"C:\Program Files\Git\usr\bin" | Out-File -FilePath $env:GITHUB_PATH -Append
|
|
|
|
- name: Check that bash works
|
|
shell: bash
|
|
run: |
|
|
bash --version | head -1
|
|
sed --version | head -1
|
|
echo "bash-and-sed-ok"
|
|
|
|
- name: Check the CLI on Windows
|
|
shell: powershell
|
|
run: cargo check --manifest-path cli/Cargo.toml
|
|
|
|
docker:
|
|
name: Docker image
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 30
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
|
|
- name: Build the image
|
|
run: docker build -t frislit:ci .
|
|
|
|
- name: Scan the image
|
|
run: |
|
|
trivy image --quiet --format json --severity HIGH,CRITICAL --ignore-unfixed \
|
|
--output report.json frislit:ci
|
|
|
|
jq -r '.Results[]?.Vulnerabilities[]? | "\(.Severity) \(.VulnerabilityID) \(.PkgName) \(.InstalledVersion)"' report.json \
|
|
| sort | uniq -c | sort -rn | head -40
|
|
|
|
high=$(jq '[.Results[]?.Vulnerabilities[]? | select(.Severity == "HIGH")] | length' report.json)
|
|
critical=$(jq '[.Results[]?.Vulnerabilities[]? | select(.Severity == "CRITICAL")] | length' report.json)
|
|
echo "HIGH=$high CRITICAL=$critical (unfixed findings ignored)"
|
|
|
|
if [ "$critical" -gt 0 ]; then
|
|
echo "::error::The image has $critical CRITICAL vulnerabilities"
|
|
exit 1
|
|
fi
|
|
|
|
cli-arm64:
|
|
name: CLI (linux-arm64, static)
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 45
|
|
continue-on-error: true
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
|
|
- name: Cache cargo
|
|
uses: actions/cache@v6
|
|
with:
|
|
path: |
|
|
~/.cargo/registry
|
|
~/.cargo/git
|
|
cli/target
|
|
key: ${{ runner.os }}-cargo-arm64-${{ hashFiles('cli/Cargo.lock') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-cargo-arm64-
|
|
|
|
- name: Cross-compile for arm64
|
|
working-directory: cli
|
|
run: cargo zigbuild --release --target aarch64-unknown-linux-musl --no-default-features
|