-
Notifications
You must be signed in to change notification settings - Fork 15
41 lines (39 loc) · 1019 Bytes
/
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
name: tests
on:
workflow_dispatch:
pull_request:
branches: [main]
push:
branches: [main]
jobs:
jest:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: cache .npm
uses: actions/cache@v2
env:
cache-name: npm
with:
path: ~/.npm
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
- run: npm ci
- run: npm run test
env:
test_api_key: ${{ secrets.SDK_CONSISTENCY_TEST_COMPANY_API_KEY }}
eslint:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
- name: cache .npm
uses: actions/cache@v2
env:
cache-name: npm
with:
path: ~/.npm
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
- run: npm install
- name: Lint
run: npm run lint:github