74 lines
2.1 KiB
YAML
74 lines
2.1 KiB
YAML
name: CI
|
|
|
|
on:
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
permissions:
|
|
contents: read
|
|
pull-requests: write
|
|
issues: write
|
|
|
|
jobs:
|
|
test:
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
node-version: [18, 20, 22, 24]
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Node.js ${{ matrix.node-version }}
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
cache: "npm"
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
|
|
- name: Build
|
|
run: npm run build
|
|
|
|
# e2e tests are failing on Windows specifically - likely due to stdout flush issues
|
|
- name: Run tests
|
|
if: matrix.os != 'windows-latest'
|
|
run: npm test
|
|
|
|
- name: Run tests (excluding e2e on Windows)
|
|
if: matrix.os == 'windows-latest'
|
|
shell: bash
|
|
run: npm test -- --testPathIgnorePatterns='.*e2e.*'
|
|
|
|
- name: Run linting
|
|
run: npm run lint
|
|
|
|
review:
|
|
uses: ./.github/workflows/continue-review.yaml
|
|
secrets:
|
|
CONTINUE_API_KEY: ${{ secrets.CONTINUE_API_KEY }}
|
|
with:
|
|
prompt: |
|
|
Please review the below changes for any mistakes. You can look around the codebase to investigate if needed. Look for:
|
|
- React changes causing too many re-renders
|
|
- Functions that are too long
|
|
- Other potentially subtle bugs
|
|
Keep your response concise and give a bullet pointed list of the findings, including suggested fixes for any problems you find.
|
|
|
|
# GitHub does not have a way of requiring that all checks pass (you must manually select each job)
|
|
# This action at least lets us manage the list of required tests via source control
|
|
# so that creators of new jobs can add them to this list
|
|
require-all-checks-to-pass:
|
|
if: always()
|
|
runs-on: ubuntu-latest
|
|
needs:
|
|
- test
|
|
|
|
steps:
|
|
- name: Decide whether the needed jobs succeeded or failed
|
|
uses: re-actors/alls-green@release/v1
|
|
with:
|
|
jobs: ${{ toJSON(needs) }}
|