mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-10-11 18:19:42 +02:00
adj
This commit is contained in:
59
.github/workflows/build.yml
vendored
59
.github/workflows/build.yml
vendored
@@ -8,6 +8,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
node-version: [10.x, 12.x]
|
node-version: [10.x, 12.x]
|
||||||
|
browser: [chrome]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
|
|
||||||
@@ -25,20 +26,15 @@ jobs:
|
|||||||
path: ~/.cache/yarn
|
path: ~/.cache/yarn
|
||||||
key: ${{ runner.OS }}-node-${{ hashFiles('**/yarn.lock') }}
|
key: ${{ runner.OS }}-node-${{ hashFiles('**/yarn.lock') }}
|
||||||
|
|
||||||
- name: Cache Cypress
|
|
||||||
uses: actions/cache@v1
|
|
||||||
with:
|
|
||||||
path: ~/.cache/Cypress
|
|
||||||
key: ${{ runner.os }}-cypress-${{ hashFiles('**/package.json') }}
|
|
||||||
|
|
||||||
- name: Install Packages
|
- name: Install Packages
|
||||||
run: |
|
run: |
|
||||||
yarn config set cache-folder ~/.cache/yarn
|
yarn config set cache-folder ~/.cache/yarn
|
||||||
export CYPRESS_CACHE_FOLDER=~/.cache/Cypress
|
|
||||||
yarn install --frozen-lockfile
|
yarn install --frozen-lockfile
|
||||||
npx cypress cache path
|
|
||||||
npx cypress cache list
|
- name: Install Cypress
|
||||||
npx cypress verify
|
uses: cypress-io/github-action@v1
|
||||||
|
with:
|
||||||
|
runTests: false
|
||||||
|
|
||||||
- name: Run Build
|
- name: Run Build
|
||||||
run: yarn build
|
run: yarn build
|
||||||
@@ -59,31 +55,34 @@ jobs:
|
|||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
parallel: true
|
parallel: true
|
||||||
|
|
||||||
- name: Run E2E Tests
|
- uses: cypress-io/github-action@v1
|
||||||
run: |
|
with:
|
||||||
export CYPRESS_CACHE_FOLDER=~/.cache/Cypress
|
browser: ${{ matrix.browser }}
|
||||||
npx cypress cache path
|
headless: true
|
||||||
npx cypress cache list
|
command-prefix: 'percy exec -- npx'
|
||||||
npx cypress install
|
start: yarn dev
|
||||||
yarn e2e
|
wait-on: 'http://localhost:9000'
|
||||||
|
install: false
|
||||||
|
working-directory: cypress
|
||||||
env:
|
env:
|
||||||
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}
|
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}
|
||||||
|
|
||||||
|
- name: Upload cypress screenshots
|
||||||
|
uses: actions/upload-artifact@master
|
||||||
|
with:
|
||||||
|
name: cypress-screenshots
|
||||||
|
path: cypress/screenshots
|
||||||
|
if: failure()
|
||||||
|
|
||||||
|
- name: Upload cypress videos
|
||||||
|
uses: actions/upload-artifact@master
|
||||||
|
if: always()
|
||||||
|
with:
|
||||||
|
name: cypress-videos
|
||||||
|
path: cypress/videos
|
||||||
|
|
||||||
- name: Post Upload Test Results
|
- name: Post Upload Test Results
|
||||||
uses: coverallsapp/github-action@master
|
uses: coverallsapp/github-action@master
|
||||||
with:
|
with:
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
parallel-finished: true
|
parallel-finished: true
|
||||||
|
|
||||||
- name: Upload cypress screenshots
|
|
||||||
uses: actions/upload-artifact@master
|
|
||||||
with:
|
|
||||||
name: screenshots
|
|
||||||
path: cypress/screenshots
|
|
||||||
if: failure()
|
|
||||||
|
|
||||||
- name: Upload cypress videos
|
|
||||||
uses: actions/upload-artifact@master
|
|
||||||
with:
|
|
||||||
name: videos
|
|
||||||
path: cypress/videos
|
|
||||||
|
Reference in New Issue
Block a user