forked from dbt-labs/docs.getdbt.com
-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (39 loc) · 1.19 KB
/
cypress_tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: cypress tests
on:
pull_request:
branches:
- current
jobs:
start-workflow:
name: start workflow
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: install node
uses: actions/setup-node@v3
with:
node-version: '16.13.1'
- name: npm install
run: cd website && npm ci
- name: setup env
run: |
PR_NUMBER=$(jq --raw-output .pull_request.number ${{ github.event_path }})
echo "PR_NUMBER=${PR_NUMBER}" >> ${GITHUB_ENV}
- name: run cypress e2e
uses: cypress-io/github-action@v5
with:
command: npx cypress run
browser: chrome
working-directory: website
spec: cypress/e2e/*.cy.js
wait-on: https://deploy-preview-${{ env.PR_NUMBER }}--docs-getdbt-com.netlify.app
wait-on-timeout: 600
env:
CYPRESS_BASE_URL: https://deploy-preview-${{ env.PR_NUMBER }}--docs-getdbt-com.netlify.app
- name: Screenshot artifact upload
uses: actions/upload-artifact@v3
if: failure()
with:
name: cypress-screenshots
path: cypress/screenshots