Reworked CI sub-checks #940
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
workflow_call: | |
pull_request: | |
permissions: | |
checks: write | |
contents: read | |
jobs: | |
ci: | |
name: Continuous Integration | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 22 | |
- name: Install dependencies | |
run: npm install | |
- name: Create checks | |
run: npx zci init | |
- name: Formatting | |
run: npx zci run format "npm run format:check" | |
- name: Build | |
run: npx zci run build "npm run build" | |
- name: Linting | |
run: npx zci run lint "npm run lint" | |
- name: Unit tests (common) | |
run: npx zenfs-test --ci -pfw --common | |
- name: Unit tests (InMemory) | |
run: npx zenfs-test --ci -pfw tests/setup/memory.ts | |
- name: Unit tests (contexts) | |
run: npx zenfs-test --ci -pfw tests/setup/context.ts | |
- name: Unit tests (Index) | |
run: npx zenfs-test --ci -pfw tests/setup/index.ts | |
- name: Unit tests (Port) | |
run: npx zenfs-test --ci -pfw tests/setup/port.ts | |
- name: Unit tests (Overlay+Fetch) | |
run: tests/fetch/run.sh --ci -w | |
- name: Report coverage | |
run: npx zenfs-test --report |