-
Notifications
You must be signed in to change notification settings - Fork 1
109 lines (104 loc) · 3.82 KB
/
master.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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
name: Master CI
on:
push:
branches:
- master
env:
CI: true
HEADLESS: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_BRANCH: ${{ github.ref }}
GITHUB_COMMIT: ${{ github.sha }}
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
node-version: [10.x, 12.x, 13.x, 14.x]
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
ssh-key: ${{ secrets.SSH_KEY }}
- name: Use Node.js ${{ matrix.node-version }} on ${{ matrix.os }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: nodejs project information
id: projectinfo
uses: gregoranders/nodejs-project-info@v0.0.6
- name: npm install
run: |
npm install
- name: npm run build
run: |
npm run build
- name: npm test
run: |
npm test
- name: code coverage
if: matrix.os == 'ubuntu-latest' && matrix.node-version == '14.x'
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./test/coverage/lcov.info
- name: publish code coverage to code climate
if: matrix.os == 'ubuntu-latest' && matrix.node-version == '14.x'
uses: paambaati/codeclimate-action@v2.6.0
env:
CC_TEST_REPORTER_ID: ${{ secrets.CODE_CLIMATE }}
with:
coverageCommand: npm run test
coverageLocations: |
./test/coverage/lcov.info:lcov
debug: true
- name: npm run e2e
if: matrix.os == 'ubuntu-latest' && matrix.node-version == '14.x'
run: |
sudo apt-get update
sudo apt-get install ca-certificates libnss3-tools xvfb
sudo mkdir -pv /usr/local/share/ca-certificates
sudo cp -v ssl/fritz.box.crt /usr/local/share/ca-certificates/
sudo chmod 644 /usr/local/share/ca-certificates/*
sudo update-ca-certificates
mkdir -pv ${HOME}/.pki/nssdb
echo > .password
certutil -N -d sql:${HOME}/.pki/nssdb -f .password
certutil -A -d sql:${HOME}/.pki/nssdb -f .password -t "C,," -n "fritz.box" -i ssl/fritz.box.crt
rm -rf .password
xvfb-run --auto-servernum -- bash -c "npm run e2e"
env:
PACKAGE_JSON: ${{ steps.projectinfo.outputs.context }}
- name: npm run e2e
if: matrix.os == 'macos-latest' && matrix.node-version == '14.x'
run: |
sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.Keychain ssl/fritz.box.crt
npm run e2e
env:
PACKAGE_JSON: ${{ steps.projectinfo.outputs.context }}
- name: npm run e2e
if: matrix.os == 'windows-latest' && matrix.node-version == '14.x'
run: |
certutil -addstore -f "ROOT" ssl\fritz.box.crt
npm run e2e
env:
PACKAGE_JSON: ${{ steps.projectinfo.outputs.context }}
- name: archive e2e screenshots
uses: actions/upload-artifact@v1
if: matrix.node-version == '14.x'
with:
name: Screenshots Master ${{ matrix.os }} ${{ matrix.node-version }}
path: e2e/screenshots
- name: create release
if: matrix.os == 'ubuntu-latest' && matrix.node-version == '14.x'
id: createrelease
uses: gregoranders/nodejs-create-release@v0.0.6
env:
PACKAGE_JSON: ${{ steps.projectinfo.outputs.context }}
with:
tag: v${{ steps.projectinfo.outputs.version }}
name: ${{ steps.projectinfo.outputs.version }} Release
body: ${{ steps.projectinfo.outputs.name }} - ${{ steps.projectinfo.outputs.version }} Release
target: ${{ github.ref }}
draft: false