mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-11-03 04:14:15 +01:00
71 lines
2.2 KiB
YAML
71 lines
2.2 KiB
YAML
name: E2E - Generate Timings
|
|
|
|
on:
|
|
# run this workflow every night at 3am
|
|
schedule:
|
|
- cron: '28 3 * * *'
|
|
# or when the user triggers it from GitHub Actions page
|
|
workflow_dispatch:
|
|
|
|
concurrency: ${{ github.workflow }}-${{ github.ref }}
|
|
|
|
permissions:
|
|
contents: write
|
|
pull-requests: write
|
|
|
|
jobs:
|
|
timings:
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: cypress/browsers:node-20.11.0-chrome-121.0.6167.85-1-ff-120.0-edge-121.0.2277.83-1
|
|
options: --user 1001
|
|
steps:
|
|
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
|
|
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
|
with:
|
|
node-version-file: '.node-version'
|
|
- name: Install dependencies
|
|
uses: cypress-io/github-action@b8ba51a856ba5f4c15cf39007636d4ab04f23e3c # v6.10.2
|
|
with:
|
|
runTests: false
|
|
|
|
- name: Cypress run
|
|
uses: cypress-io/github-action@b8ba51a856ba5f4c15cf39007636d4ab04f23e3c # v6.10.2
|
|
id: cypress
|
|
with:
|
|
install: false
|
|
start: pnpm run dev:coverage
|
|
wait-on: 'http://localhost:9000'
|
|
browser: chrome
|
|
publish-summary: false
|
|
env:
|
|
VITEST_COVERAGE: true
|
|
CYPRESS_COMMIT: ${{ github.sha }}
|
|
SPLIT: 1
|
|
SPLIT_INDEX: 0
|
|
SPLIT_FILE: 'cypress/timings.json'
|
|
|
|
- name: Compare timings
|
|
id: compare
|
|
run: |
|
|
OUTPUT=$(pnpm tsx scripts/compare-timings.ts)
|
|
echo "$OUTPUT" >> $GITHUB_STEP_SUMMARY
|
|
|
|
echo "output<<EOF" >> $GITHUB_OUTPUT
|
|
echo "$OUTPUT" >> $GITHUB_OUTPUT
|
|
echo "EOF" >> $GITHUB_OUTPUT
|
|
|
|
- name: Commit and create pull request
|
|
uses: peter-evans/create-pull-request@915d841dae6a4f191bb78faf61a257411d7be4d2
|
|
with:
|
|
add-paths: |
|
|
cypress/timings.json
|
|
commit-message: 'chore: update E2E timings'
|
|
branch: update-timings
|
|
title: Update E2E Timings
|
|
body: ${{ steps.compare.outputs.output }}
|
|
delete-branch: true
|
|
sign-commits: true
|