Skip to content

test: add tests

test: add tests #424

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
workflow_call:
jobs:
ci:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/update-cache
- name: Debug github action ref
run: |
echo "Tag name from GITHUB_REF_NAME: $GITHUB_REF_NAME"
echo "Tag name from github.ref_name: ${{ github.ref_name }}"
- name: Build
run : npm run build
- name: Test doc build
run: npm run docs:build
- name: Run Playwright tests
run: npx playwright test --reporter=html
- name: Get the failure count
id: tests
run: |
export count=$(cat ./playwright-report/result.txt | grep Failed | cut -d ':' -f 2 | tr -d ' ')
echo "fail_count=$count" >> "$GITHUB_OUTPUT"
echo $count
- uses: mshick/add-pr-comment@v2
if: always()
with:
message-path: |
./playwright-report/result.txt
message-failure: |
Workflow failed
- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: playwright-report
path: playwright-report/
retention-days: 30