Core | Test: Install serve #20
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Cypress Percy Tests | |
on: [push] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '16.x' | |
- name: Install npm 8 | |
run: npm install -g npm@8 | |
- name: Install dependencies | |
run: npm ci | |
- name: Build | |
run: npm run build && npm run build:dev | |
- name: Install Percy | |
run: cd packages/dev; npm install --save-dev @percy/cli | |
- name: Start server | |
run: cd packages/dev; npm run serve & sleep 5 | |
- name: Run tests | |
run: cd packages/dev; npm test | |
env: | |
PERCY_TOKEN: $ | |
- name: Stop server | |
run: pkill -f "serve dist -s -p 9501" |