-
Notifications
You must be signed in to change notification settings - Fork 2
72 lines (69 loc) · 2.3 KB
/
build.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
name: build and test
on: [push]
jobs:
unit-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '14.21.1'
- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: |
~/.npm
~/.cache/Cypress
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- run: npm ci
- run: npm run lint
- run: |
GITHUB_SHA_SHORT=$(echo $GITHUB_SHA | cut -c1-8)
echo $GITHUB_SHA_SHORT
- run: npm install puppeteer --save-dev
- run: npm run test:ci
cypress:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '14.21.1'
- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: |
~/.npm
~/.cache/Cypress
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- run: npm ci
- run: npm run build:test -- --progress=false
- run: npm run web-server &
- name: Get the current branch name
shell: bash
run: echo "::set-output name=branch::${GITHUB_REF#refs/heads/}"
id: branch
- run: npx cypress run --record
env:
APPLITOOLS_API_KEY: ${{ secrets.APPLITOOLS_KEY }}
APPLITOOLS_CONCURRENCY: 5
APPLITOOLS_PARENT_BRANCH_NAME: master
APPLITOOLS_BRANCH_NAME: ${{ steps.branch.outputs.branch }}
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_KEY }}
APPLITOOLS_BATCH_ID: ${{ github.run_number }}
APPLITOOLS_BATCH_NAME: ${{ steps.branch.outputs.branch }}
TZ: "America/Argentina/Buenos_Aires"