Skip to content

Filters example

Filters example #257

Workflow file for this run

name: CI-PR
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
pull_request:
types: [opened, synchronize, reopened]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
with:
token: ${{ secrets.GIT_TOKEN }}
# Setup node environment
- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: "20"
# Install node modules
- name: Install node modules
run: |
yarn install --frozen-lockfile
# Generate docs
- name: Generate docs
run: |
yarn run docs:build
# Generate Build
- name: Generate build
run: |
yarn run build
# Check Prettier
- name: Check Prettier
run: |
yarn run format:check
- name: Install mochawesome-merge
run: yarn install --no-save mochawesome-merge
- name: Run Cypress tests
run: yarn run cypress:run
- name: Combine test reports
run: node .github/scripts/combine-reports.js
- name: Generate Cypress summary
run: node .github/scripts/cypress-summary.js report/json/result.json
- name: Upload Cypress reports artifact
uses: actions/upload-artifact@v4
with:
name: cypress-test-reports
path: |
report/json/result.json
cypress-summary.md
- name: Find Comment
uses: peter-evans/find-comment@v2
id: find-comment
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'
body-includes: "## 🔍 Cypress Test Results"
- name: Create or update comment
uses: peter-evans/create-or-update-comment@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.pull_request.number }}
comment-id: ${{ steps.find-comment.outputs.comment-id }}
body-path: cypress-summary.md
edit-mode: replace
- name: Run tests and generate coverage
run: yarn run coverage
- name: Upload coverage report
uses: actions/upload-artifact@v4
with:
name: typescript-coverage
path: coverage-ts/index.html
- name: Display coverage summary
run: node .github/scripts/ts-coverage-summary.js coverage-ts/index.html
- name: Find Coverage Comment
uses: peter-evans/find-comment@v2
id: find-coverage-comment
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'
body-includes: "## 🧪 TypeScript Coverage Report"
- name: Create or update PR comment with coverage
uses: peter-evans/create-or-update-comment@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.pull_request.number }}
comment-id: ${{ steps.find-coverage-comment.outputs.comment-id }}
body-path: coverage-summary.md
edit-mode: replace