-
Notifications
You must be signed in to change notification settings - Fork 98
49 lines (48 loc) · 1.2 KB
/
api_test.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
name: API Testing Workflow
on:
pull_request:
branches:
- '*'
paths:
- 'api/**'
env:
WORKING_DIRECTORY: ./api
jobs:
test:
name: Unit Tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Setup Node.js
uses: actions/setup-node@v1
- name: NPM Install
uses: bahmutov/npm-install@v1
- name: Run Unit Tests and Submit Coverage
run: |
yarn test:unit --coverage
bash <(curl -s https://codecov.io/bash)
working-directory: ${{env.WORKING_DIRECTORY}}
lint:
name: Linter
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Setup Node.js
uses: actions/setup-node@v1
- name: NPM Install
uses: bahmutov/npm-install@v1
- name: Lint
run: yarn lint
working-directory: ${{env.WORKING_DIRECTORY}}
checkChangelog:
name: Changelog
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Setup Node.js
uses: actions/setup-node@v1
- name: Check Changelog
run: npx simsala check --pending-path ./api/changes