-
Notifications
You must be signed in to change notification settings - Fork 124
59 lines (57 loc) · 2.04 KB
/
e2e-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
48
49
50
51
52
53
54
55
56
57
58
59
name: Integration tests
on:
# Trigger the workflow on pull request to master branch
pull_request:
branches:
- master
jobs:
integration-tests:
runs-on: ubuntu-latest
strategy:
matrix:
# browser: ['chrome', 'firefox'] // can't use firefox until https://github.com/cypress-io/cypress/issues/14600 is fixed
browser: ['chrome']
# run 10 copies of the current job in parallel
containers: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
steps:
- uses: actions/setup-node@v1
with:
node-version: "12.x"
- name: Install build-essential and python
run: sudo apt-get install -y build-essential python
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Git Checkout
uses: actions/checkout@v2
- name: Get NPM Cache Dir
id: npm-cache
run: |
echo "::set-output name=dir::$(npm config get cache)"
- name: Enable NPM Cache on package-lock file
uses: actions/cache@v1
with:
path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install NPM dependencies and build Userbase
run: |
npm run ci:install
npm run build:userbase-js:script
- name: Run Browser Tests
uses: cypress-io/github-action@v2
env:
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
with:
browser: ${{ matrix.browser }}
group: ${{ matrix.browser }}
start: npm run ci:start
wait-on: "http://localhost:8080/ping"
wait-on-timeout: 120
record: true
parallel: true
env: configFile=ci