Skip to content

Merge pull request #30 from 0xSero/cleanup/code-prune-pass-1 #72

Merge pull request #30 from 0xSero/cleanup/code-prune-pass-1

Merge pull request #30 from 0xSero/cleanup/code-prune-pass-1 #72

Workflow file for this run

name: CI
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
repo-standards:
name: Repo Standards
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- run: npm ci
- name: Resolve standards base
id: standards-base
run: |
if [ "${{ github.event_name }}" = "pull_request" ]; then
echo "value=${{ github.event.pull_request.base.sha }}" >> "$GITHUB_OUTPUT"
else
echo "value=${{ github.event.before }}" >> "$GITHUB_OUTPUT"
fi
- run: npm run check:repo-standards -- --base=${{ steps.standards-base.outputs.value }}
tech-debt:
name: Tech Debt Scan
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- run: npm ci
- name: Resolve standards base
id: td-base
run: |
if [ "${{ github.event_name }}" = "pull_request" ]; then
echo "value=${{ github.event.pull_request.base.sha }}" >> "$GITHUB_OUTPUT"
else
echo "value=${{ github.event.before }}" >> "$GITHUB_OUTPUT"
fi
- run: npm run check:tech-debt -- --base=${{ steps.td-base.outputs.value }}
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- run: npm ci
- run: npm run lint
typecheck:
name: Type Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- run: npm ci
- run: npm run typecheck
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- run: npm ci
- run: npm run build
- run: npm run build:firefox
- name: Package Chrome Extension
run: |
cd dist && zip -r ../parchi-chrome-${{ github.run_number }}.zip . && cd ..
- name: Package Firefox Extension
run: |
cd dist-firefox && zip -r ../parchi-firefox-${{ github.run_number }}.xpi . && cd ..
- uses: actions/upload-artifact@v4
with:
name: extension-chrome
path: parchi-chrome-${{ github.run_number }}.zip
retention-days: 30
- uses: actions/upload-artifact@v4
with:
name: extension-firefox
path: parchi-firefox-${{ github.run_number }}.xpi
retention-days: 30
test:
name: Unit Tests
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- run: npm ci
- run: npm run test:unit
orchestrator-validation:
name: Orchestrator Validation
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- run: npm ci
- run: npm run test:orchestrator
- uses: actions/upload-artifact@v4
if: always()
with:
name: orchestrator-validation-artifacts
path: |
test-output/orchestrator-fixture-execution.json
test-output/orchestrator-fixture-execution.md
test-output/orchestrator-criteria-matrix.json
test-output/orchestrator-criteria-matrix.md
test-output/orchestrator-service-integration.json
test-output/orchestrator-service-integration.md
if-no-files-found: warn
retention-days: 30