CI #1471
This file contains hidden or 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 | |
pull_request: | |
schedule: | |
- cron: 0 * * * * | |
permissions: | |
contents: read | |
jobs: | |
static-analysis: | |
name: Static Analysis | |
runs-on: namespace-profile-ubuntu-2-cores | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version-file: .nvmrc | |
cache: npm | |
- run: npm install | |
- run: npm run check | |
- run: npm run lint | |
- run: npm run build | |
unit-tests: | |
name: Unit Tests | |
runs-on: namespace-profile-ubuntu-2-cores | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version-file: .nvmrc | |
cache: npm | |
- run: npm install | |
- run: npm run test:unit run | |
env: | |
CI: true | |
e2e-tests: | |
name: E2E Tests | |
runs-on: namespace-profile-ubuntu-2-cores | |
timeout-minutes: 10 | |
environment: CI | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version-file: .nvmrc | |
cache: npm | |
- run: npm install | |
- run: npx playwright install | |
- run: | | |
npm run build | |
npm run test:e2e | |
env: | |
VITE_API_TOKEN: ${{ secrets.KITTYCAD_API_TOKEN_DEV }} | |
TAB_API_URL: ${{ secrets.TAB_API_URL }} | |
TAB_API_KEY: ${{ secrets.TAB_API_KEY }} | |
CI_COMMIT_SHA: ${{ github.event.pull_request.head.sha }} | |
CI_PR_NUMBER: ${{ github.event.pull_request.number }} | |
- name: Upload artifacts | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: test-results | |
path: test-results/ | |
retention-days: 30 |