-
Notifications
You must be signed in to change notification settings - Fork 6
60 lines (54 loc) · 1.74 KB
/
node.js.yml
File metadata and controls
60 lines (54 loc) · 1.74 KB
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
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Node.js CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install npm packages
run: |
npm install
npm run build --if-present
env:
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: true
- name: Run e2e tests
run: npm run crawl && npm run test:ci
- name: Publish e2e tests report in xunit/junit xml format
uses: EnricoMi/publish-unit-test-result-action@v1.6
if: always()
with:
check_name: e2e tests results
comment_title: e2e tests statistics
github_token: ${{ secrets.GITHUB_TOKEN }}
files: testing/reports/**/*.xml
- name: "Archive tests artifacts"
uses: actions/upload-artifact@v2
if: always()
with:
name: e2e-artifacts
path: |
testing/output
testing/reports/**/*.xml
testing/screenshots
- name: "Lighthouse CI step"
run: |
echo "{ \"serverBaseUrl\": \"$LHI_URL\", \"token\": \"$LHI_BUILD_KEY\" }" > lhci_settings.json
npm install -g @lhci/cli@0.4.x
npm run crawl
lhci autorun || true
env:
LHI_URL: ${{ secrets.LHI_URL }}
LHI_BUILD_KEY: ${{ secrets.LHI_BUILD_TOKEN }}