-
Notifications
You must be signed in to change notification settings - Fork 4
83 lines (68 loc) · 2.09 KB
/
test-e2e.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: test-e2e
on:
push:
branches:
- main
- develop
pull_request:
branches:
- main
- develop
jobs:
ci:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
node: [14]
steps:
- name: Checkout 🛎
uses: actions/checkout@master
- name: Setup node env 🏗
uses: actions/[email protected]
with:
node-version: ${{ matrix.node }}
check-latest: true
- name: Get yarn cache directory path 🛠
id: yarn-cache-dir-path
run: cd nuxt && echo "::set-output name=dir::$(yarn cache dir)"
- name: Cache node_modules 📦
uses: actions/[email protected]
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Setup ddev
uses: jonaseberle/github-action-setup-ddev@v1
with:
autostart: false
- name: Start ddev
run: cd drupal && ddev start
- name: Install Drupal 👨🏻💻
run: cd drupal && ddev drupal-install
- name: Install Nuxt.js 👨🏻💻
run: cd nuxt && yarn
# - name: Run linting 🔎
# run: cd nuxt && yarn lint
# - name: Run Jest tests 🧪
# run: cd nuxt && yarn test:jest
- name: Run end-to-end tests 🧪
run: cd nuxt && NODE_TLS_REJECT_UNAUTHORIZED=0 yarn test:e2e
- uses: actions/upload-artifact@v3
if: failure()
with:
name: cypress-screenshots
path: nuxt/cypress/screenshots
- uses: actions/upload-artifact@v3
if: always()
with:
name: cypress-videos
path: nuxt/cypress/videos
# - uses: codecov/codecov-action@v3
# with:
# files: ./nuxt/coverage/clover.xml
# name: codecov-umbrella
# fail_ci_if_error: true
# verbose: true