-
Notifications
You must be signed in to change notification settings - Fork 11
108 lines (87 loc) · 2.65 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
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
name: tests
on:
push:
branches:
- master
tags-ignore:
- '**'
pull_request:
schedule:
- cron: '0 0 * * 0' # once in a week, docs: <https://git.io/JvxXE#onschedule>
env:
NODE_VERSION: '12'
jobs: # Docs: <https://git.io/JvxXE>
test:
name: Run tests
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Setup NodeJS
uses: actions/setup-node@v1 # Action page: <https://github.com/actions/setup-node>
with:
node-version: ${{ env.NODE_VERSION }}
- uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
- name: Install dependencies
run: yarn install
- name: Run tests
run: yarn test
- uses: codecov/codecov-action@v1 # Docs: <https://github.com/codecov/codecov-action>
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage/clover.xml
fail_ci_if_error: false
lint:
name: Run linter
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Setup NodeJS
uses: actions/setup-node@v1 # Action page: <https://github.com/actions/setup-node>
with:
node-version: ${{ env.NODE_VERSION }}
- uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
- name: Install dependencies
run: yarn install
- name: Run linter
run: yarn lint
build:
name: Try to build
runs-on: ubuntu-latest
needs: [test, lint]
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Setup NodeJS
uses: actions/setup-node@v1 # Action page: <https://github.com/actions/setup-node>
with:
node-version: ${{ env.NODE_VERSION }}
- uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
- name: Install dependencies
run: yarn install
- name: Build component
run: yarn build
- name: Build demo
run: yarn build:demo
lint-changelog:
name: Lint changelog file
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Lint changelog file
uses: docker://avtodev/markdown-lint:v1 # Action page: <https://github.com/avto-dev/markdown-lint>
with:
rules: '/lint/rules/changelog.js'
config: '/lint/config/changelog.yml'
args: './CHANGELOG.md'