-
Notifications
You must be signed in to change notification settings - Fork 109
executable file
·66 lines (56 loc) · 1.62 KB
/
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
60
61
62
63
64
65
66
name: Run all tests
on:
pull_request:
branches:
- master
jobs:
tests:
env:
CI: true
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
test-scope: [lint, unit, gemini]
node-version: [12.14.1]
steps:
- uses: actions/checkout@v2
- name: Get nodejs version for test
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: |
npm cache clean --force
rm -rf ~/.npm node_modules
npm ci
- name: Lint's checks
if: ${{ matrix.test-scope == 'lint' }}
run: |
npm run lint
- name: Publish to styleguide
if: ${{ matrix.test-scope == 'lint' }}
run: |
sh ${{ github.workspace }}/tools/publish-styleguide.sh
- name: Run tests
if: ${{ matrix.test-scope == 'unit' }}
run: |
npm run test:coverage
npm run compile
- name: Coveralls
if: ${{ matrix.test-scope == 'unit' }}
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
- name: Run gemini
if: ${{ matrix.test-scope == 'gemini' }}
run: |
npm run sauce-connect
npm run gemini-ci
env:
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
- name: Send gemini's error log
if: ${{ matrix.test-scope == 'gemini' && failure() }}
run: |
sh ${{ github.workspace }}/tools/publish-gemini-report.sh