Merge pull request #130 from lukmarcus/noisy-master #7
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 Tests | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
cypress-tests: | |
runs-on: ubuntu-latest | |
container: | |
image: cypress/base:18.15.0 | |
steps: | |
- name: reinstall ca-certificates | |
# Fix for https://github.com/noisy/portfolio/actions/runs/4708656910/jobs/8351231323 | |
# https://stackoverflow.com/a/35824116/338581 | |
run: | | |
apt-get update | |
apt-get install -y --reinstall ca-certificates | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install dependencies | |
uses: cypress-io/[email protected] | |
with: | |
# just perform install | |
runTests: false | |
- name: E2E tests | |
uses: cypress-io/[email protected] | |
with: | |
config-file: cypress.config.e2e.ts | |
install: false | |
build: npm run build | |
start: npm run preview | |
wait-on: "http://localhost:5050" | |
wait-on-timeout: 120 | |
record: true | |
env: | |
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_E2E_RECORD_KEY }} | |
# Recommended: pass the GitHub token lets this action correctly | |
# determine the unique run id necessary to re-run the checks | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# overwrite commit message sent to Cypress Cloud | |
COMMIT_INFO_MESSAGE: ${{ github.event.pull_request.title }} | |
# re-enable PR comment bot | |
COMMIT_INFO_SHA: ${{ github.event.pull_request.head.sha }} | |
- name: Components tests | |
uses: cypress-io/[email protected] | |
with: | |
config-file: cypress.config.components.ts | |
install: false | |
record: true | |
component: true | |
env: | |
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_COMPONENTS_RECORD_KEY }} | |
# Recommended: pass the GitHub token lets this action correctly | |
# determine the unique run id necessary to re-run the checks | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# overwrite commit message sent to Cypress Cloud | |
COMMIT_INFO_MESSAGE: ${{ github.event.pull_request.title }} | |
# re-enable PR comment bot | |
COMMIT_INFO_SHA: ${{ github.event.pull_request.head.sha }} |