Files
webnet/.gitea/workflows/ci.yml
T
codingetandCodex 2cabbf50f1
CI / format (pull_request) Successful in 1m58s
CI / lint (pull_request) Successful in 2m0s
CI / install (pull_request) Successful in 5m26s
CI / typetest (pull_request) Successful in 1m27s
CI / node-tests (pull_request) Successful in 1m48s
CI / typecheck (pull_request) Successful in 1m49s
CI / browser-tests (pull_request) Successful in 3m10s
test: tighten package-boundary checks
Co-Authored-By: gpt-5.6-sol <noreply@openai.com>
2026-07-26 15:50:36 +00:00

204 lines
4.7 KiB
YAML

name: CI
on:
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
install:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.gitea/actions/setup
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Archive node_modules
run: |
shopt -s nullglob
tar -czf node_modules.tar.gz node_modules packages/*/node_modules
- uses: actions/upload-artifact@v3
with:
name: node_modules-${{ github.run_id }}
path: node_modules.tar.gz
- name: Archive turbo cache
run: tar -czf turbo-cache.tar.gz .turbo
- uses: actions/upload-artifact@v3
with:
name: turbo-cache-${{ github.run_id }}
path: turbo-cache.tar.gz
- name: Archive build artifacts
run: |
shopt -s nullglob
tar -czf build-artifacts.tar.gz packages/*/dist packages/*/out
- uses: actions/upload-artifact@v3
with:
name: build-artifacts-${{ github.run_id }}
path: build-artifacts.tar.gz
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.gitea/actions/setup
with:
submodule: "false"
- name: Install dependencies
run: npm ci
- name: Lint
run: npm run lint
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.gitea/actions/setup
with:
submodule: "false"
- name: Install dependencies
run: npm ci
- name: Check formatting
run: npm run format:check
typecheck:
runs-on: ubuntu-latest
needs: install
steps:
- uses: actions/checkout@v4
- uses: ./.gitea/actions/setup
- uses: actions/download-artifact@v3
with:
name: node_modules-${{ github.run_id }}
- uses: actions/download-artifact@v3
with:
name: turbo-cache-${{ github.run_id }}
- uses: actions/download-artifact@v3
with:
name: build-artifacts-${{ github.run_id }}
- name: Restore node_modules and turbo cache
run: |
tar -xzf node_modules.tar.gz
tar -xzf turbo-cache.tar.gz
tar -xzf build-artifacts.tar.gz
- name: Typecheck
run: npm run typecheck
typetest:
runs-on: ubuntu-latest
needs: install
steps:
- uses: actions/checkout@v4
- uses: ./.gitea/actions/setup
- uses: actions/download-artifact@v3
with:
name: node_modules-${{ github.run_id }}
- uses: actions/download-artifact@v3
with:
name: turbo-cache-${{ github.run_id }}
- uses: actions/download-artifact@v3
with:
name: build-artifacts-${{ github.run_id }}
- name: Restore node_modules and turbo cache
run: |
tar -xzf node_modules.tar.gz
tar -xzf turbo-cache.tar.gz
tar -xzf build-artifacts.tar.gz
- name: Type tests
run: npm run typetest
node-tests:
runs-on: ubuntu-latest
needs: install
steps:
- uses: actions/checkout@v4
- uses: ./.gitea/actions/setup
- uses: actions/download-artifact@v3
with:
name: node_modules-${{ github.run_id }}
- uses: actions/download-artifact@v3
with:
name: turbo-cache-${{ github.run_id }}
- uses: actions/download-artifact@v3
with:
name: build-artifacts-${{ github.run_id }}
- name: Restore node_modules and turbo cache
run: |
tar -xzf node_modules.tar.gz
tar -xzf turbo-cache.tar.gz
tar -xzf build-artifacts.tar.gz
- name: Run node tests
run: npm run test
- name: Test package boundaries
if: always()
run: npm run test:package-boundaries
browser-tests:
runs-on: ubuntu-latest
needs: install
steps:
- uses: actions/checkout@v4
- uses: ./.gitea/actions/setup
- uses: actions/download-artifact@v3
with:
name: node_modules-${{ github.run_id }}
- uses: actions/download-artifact@v3
with:
name: turbo-cache-${{ github.run_id }}
- uses: actions/download-artifact@v3
with:
name: build-artifacts-${{ github.run_id }}
- name: Restore node_modules and turbo cache
run: |
tar -xzf node_modules.tar.gz
tar -xzf turbo-cache.tar.gz
tar -xzf build-artifacts.tar.gz
- name: Install browser binaries
run: npx playwright install --with-deps chromium firefox
- name: Run browser tests
run: npm run test:browser