Skip to content

Better way to handle type inference across TypeScript versions. #3

Better way to handle type inference across TypeScript versions.

Better way to handle type inference across TypeScript versions. #3

Workflow file for this run

name: Validation
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
jobs:
check-format:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Install dependencies
run: npm ci
- name: Check formatting using prettier
run: npm run check-format
check-types:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Install dependencies
run: npm ci
- name: Check types using tsc
run: npm run check-types
check-lint:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Install dependencies
run: npm ci
- name: Check using eslint
run: npm run check-lint
build-dev:
timeout-minutes: 60
runs-on: ubuntu-latest
needs: [check-format, check-types, check-lint]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Install dependencies
run: npm ci
- name: Check using eslint
run: npm run build-dev
test-unit:
timeout-minutes: 60
runs-on: ubuntu-latest
needs: [build-dev]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Install dependencies
run: npm ci
- name: Run unit tests
run: npx jest
test-ui:
timeout-minutes: 60
runs-on: ubuntu-latest
needs: [build-dev]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Install dependencies
run: npm ci
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Run Playwright tests
run: npx playwright test
- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: playwright-report
path: playwright-report/
retention-days: 30
test-coverage:
timeout-minutes: 60
runs-on: ubuntu-latest
needs: [test-ui, test-unit]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Install dependencies
run: npm ci
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Run all tests with coverage
run: npm run coverage
- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: coverage-total
path: coverage-total/
retention-days: 30
- name: Prepare coverage report in markdown
uses: fingerprintjs/action-coverage-report-md@v2
id: coverage
with:
textReportPath: './coverage-total/text-report.txt'
- name: Add coverage report to the job summary
run: |
echo "## Code Coverage" >> $GITHUB_STEP_SUMMARY
echo "${{ steps.coverage.outputs.markdownReport }}" >> $GITHUB_STEP_SUMMARY