Skip to content

Update CI.yml

Update CI.yml #60

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
strategy:
matrix:
node-version: [20.x]
name: Build with ${{ matrix.node-version }}
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- uses: oven-sh/[email protected]
with:
bun-version: latest
- run: bun install
test:
strategy:
matrix:
node-version: [20.x]
name: Run all tests
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: oven-sh/[email protected]
with:
bun-version: latest
- run: bun install
- if: github.event_name == 'pull_request'
name: Validate all commits from PR
run: bun run commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose
- name: Linter
run: bun run lint # Use bun instead of npm
- name: Type checking
run: bun run check-types # Use bun instead of npm
- name: Run unit tests
run: bun run test # Use bun instead of npm
- name: Install Playwright (used for Storybook and E2E tests)
run: bun run playwright install --with-deps
# disabled at the moment - not supported with bun
# - name: Run storybook tests
# run: bun run test-storybook:ci # Use bun instead of npm
- name: Run E2E tests
run: bun run percy exec -- bun run test:e2e # Use bun instead of npm
env:
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}
- uses: actions/upload-artifact@v3
if: always()
with:
name: test-results
path: test-results/
retention-days: 7