All checks were successful
Test / test-frontend (pull_request) Successful in 1m17s
Test / lint-frontend (pull_request) Successful in 1m19s
Test / frontend-build (pull_request) Successful in 1m55s
Verify / verify-openapi-spec (pull_request) Successful in 31s
Verify / verify-generated-agent-code (pull_request) Successful in 2m54s
Verify / verify-generated-code (pull_request) Successful in 3m57s
Verify / verify-frontend-api-client (pull_request) Successful in 8s
Test / lint (pull_request) Successful in 1m25s
Test / test (pull_request) Successful in 3m26s
164 lines
3.9 KiB
YAML
164 lines
3.9 KiB
YAML
# this workflow runs tests on pull request and push events targeting master branch
|
|
# it also verify the generated code is up to date and valid
|
|
|
|
name: Test
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
|
|
jobs:
|
|
# setup is now handled by a composite action used by downstream jobs to keep
|
|
# the workflow DRY. The composite action performs checkout, cache restore and
|
|
# toolchain setup.
|
|
|
|
test:
|
|
needs: frontend-build
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Setup Rust, checkout and restore caches
|
|
uses: ./.github/actions/setup-rust
|
|
|
|
- name: Restore frontend build cache
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: apps/frontend/build
|
|
key: frontend-build-${{ runner.os }}-run-${{ github.run_id }}
|
|
restore-keys: |
|
|
frontend-build-${{ runner.os }}-
|
|
|
|
- name: Run tests
|
|
run: cargo test --all-features
|
|
|
|
lint:
|
|
needs: frontend-build
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Setup Rust, checkout and restore caches
|
|
uses: ./.github/actions/setup-rust
|
|
with:
|
|
components: clippy, rustfmt
|
|
|
|
- name: Restore frontend build cache
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: apps/frontend/build
|
|
key: frontend-build-${{ runner.os }}-run-${{ github.run_id }}
|
|
restore-keys: |
|
|
frontend-build-${{ runner.os }}-
|
|
|
|
- name: Run clippy
|
|
run: cargo clippy --all-features -- -D warnings
|
|
|
|
- name: Check code formatting
|
|
run: cargo fmt --all -- --check
|
|
|
|
lint-frontend:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v3
|
|
|
|
- uses: pnpm/action-setup@v4
|
|
with:
|
|
version: 10
|
|
run_install: false
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 22
|
|
cache: 'pnpm'
|
|
cache-dependency-path: pnpm-lock.yaml
|
|
|
|
- name: Install frontend dependencies
|
|
run: |
|
|
cd apps/frontend
|
|
pnpm install
|
|
|
|
- name: Run frontend linter
|
|
run: |
|
|
cd apps/frontend
|
|
pnpm lint
|
|
|
|
test-frontend:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- uses: pnpm/action-setup@v4
|
|
name: Install pnpm
|
|
with:
|
|
version: 10
|
|
run_install: false
|
|
|
|
- name: Install Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 22
|
|
cache: 'pnpm'
|
|
cache-dependency-path: pnpm-lock.yaml
|
|
|
|
- name: Install frontend dependencies
|
|
run: |
|
|
cd apps/frontend
|
|
pnpm install
|
|
|
|
- name: Run frontend tests
|
|
run: |
|
|
cd apps/frontend
|
|
pnpm test
|
|
|
|
frontend-build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v3
|
|
|
|
- uses: pnpm/action-setup@v4
|
|
with:
|
|
version: 10
|
|
run_install: false
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 22
|
|
cache: 'pnpm'
|
|
cache-dependency-path: pnpm-lock.yaml
|
|
|
|
- name: Install frontend dependencies
|
|
run: |
|
|
cd apps/frontend
|
|
pnpm install --frozen-lockfile
|
|
|
|
- name: Build frontend
|
|
run: |
|
|
cd apps/frontend
|
|
pnpm build
|
|
|
|
- name: Cache frontend build
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: apps/frontend/build
|
|
key: frontend-build-${{ runner.os }}-run-${{ github.run_id }}
|
|
restore-keys: |
|
|
frontend-build-${{ runner.os }}-
|