| 1 |
name: CI |
| 2 |
on: |
| 3 |
pull_request: |
| 4 |
push: |
| 5 |
branches: |
| 6 |
- main |
| 7 |
|
| 8 |
jobs: |
| 9 |
lint: |
| 10 |
runs-on: ${{ matrix.os }} |
| 11 |
strategy: |
| 12 |
matrix: |
| 13 |
os: [ubuntu-latest] |
| 14 |
node_version: [16] |
| 15 |
fail-fast: false |
| 16 |
|
| 17 |
name: "Lint: node-${{ matrix.node_version }}, ${{ matrix.os }}" |
| 18 |
steps: |
| 19 |
- name: Checkout |
| 20 |
uses: actions/checkout@v2 |
| 21 |
- name: Set node version to ${{ matrix.node_version }} |
| 22 |
uses: actions/setup-node@v2 |
| 23 |
with: |
| 24 |
node-version: ${{ matrix.node_version }} |
| 25 |
cache: yarn |
| 26 |
- name: Install dependencies |
| 27 |
run: yarn install |
| 28 |
- name: Lint js |
| 29 |
run: yarn lint |
| 30 |
- name: Lint typescript definitions |
| 31 |
run: yarn lint:ts |
| 32 |
- name: Check prettier |
| 33 |
run: yarn prettier:check |
| 34 |
|
| 35 |
test: |
| 36 |
runs-on: ${{ matrix.os }} |
| 37 |
strategy: |
| 38 |
matrix: |
| 39 |
os: [ubuntu-latest] |
| 40 |
node_version: [10, 12, 14, 16] |
| 41 |
include: |
| 42 |
- os: macos-latest |
| 43 |
node_version: 14 |
| 44 |
fail-fast: false |
| 45 |
|
| 46 |
name: "Build&Test: node-${{ matrix.node_version }}, ${{ matrix.os }}" |
| 47 |
steps: |
| 48 |
- name: Checkout |
| 49 |
uses: actions/checkout@v2 |
| 50 |
- name: Set node version to ${{ matrix.node_version }} |
| 51 |
uses: actions/setup-node@v2 |
| 52 |
with: |
| 53 |
node-version: ${{ matrix.node_version }} |
| 54 |
cache: yarn |
| 55 |
- name: Install dependencies |
| 56 |
run: yarn install |
| 57 |
- name: Run tests |
| 58 |
run: yarn test |