-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (62 loc) · 1.65 KB
/
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
name: End-to-end test
on:
pull_request:
types:
- opened
- ready_for_review
- synchronize
branches:
- main
- staging
workflow_dispatch:
jobs:
run_e2e_tests:
name: Run E2E Tests
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./projects/bp-strapi
services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: abc1234
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
strategy:
matrix:
node-version: [16.x]
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Build bp-graphql
run: yarn install --frozen-lockfile && tsc
working-directory: ./projects/bp-graphql
- name: Install strapi dependencies
run: yarn install --frozen-lockfile
- name: Install bp-gallery dependencies
run: |
cd ../bp-gallery
yarn install --frozen-lockfile
cd ../bp-strapi
- name: Run E2E script
run: ./e2e/setup.sh
env:
PGPASSWORD: ${{ secrets.E2E_DB_PASSWORD }}
- name: Store screenshots and videos
if: always()
uses: actions/upload-artifact@v3
with:
name: screenshots-and-videos
path: |
projects/bp-gallery/cypress/screenshots/**/*
projects/bp-gallery/cypress/videos/**/*