2020-11-29 19:52:40 +00:00
|
|
|
name: CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ master ]
|
|
|
|
pull_request:
|
|
|
|
branches: [ master ]
|
|
|
|
|
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
jobs:
|
2021-11-22 11:13:16 +00:00
|
|
|
lint-node:
|
2020-11-29 19:59:32 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Use Node.js
|
|
|
|
uses: actions/setup-node@v1
|
|
|
|
with:
|
2021-11-21 13:22:10 +00:00
|
|
|
node-version: 16
|
|
|
|
- run: yarn --ignore-scripts
|
2020-11-29 19:59:32 +00:00
|
|
|
- run: yarn lint
|
2021-11-22 11:13:16 +00:00
|
|
|
lint-rust:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
toolchain: stable
|
|
|
|
profile: minimal
|
|
|
|
components: rustfmt
|
2021-11-22 11:16:45 +00:00
|
|
|
- run: cargo fmt --all -- --check
|
2020-12-13 15:01:46 +00:00
|
|
|
config:
|
2020-11-29 19:52:40 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2020-12-13 15:01:46 +00:00
|
|
|
- name: Use Node.js
|
2020-11-29 19:52:40 +00:00
|
|
|
uses: actions/setup-node@v1
|
|
|
|
with:
|
2021-11-21 13:22:10 +00:00
|
|
|
node-version: 16
|
2020-11-29 19:52:40 +00:00
|
|
|
- run: yarn
|
2021-03-19 12:10:57 +00:00
|
|
|
- run: node lib/Config/Defaults.js --config > expected-config.sample.yml
|
2020-12-13 15:01:46 +00:00
|
|
|
- run: cmp --silent config.sample.yml expected-config.sample.yml
|
|
|
|
test:
|
2020-12-13 14:55:36 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2021-11-21 13:24:39 +00:00
|
|
|
node_version: [12, 14, 16]
|
2020-12-13 14:55:36 +00:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2020-12-13 15:01:46 +00:00
|
|
|
- name: Use Node.js ${{ matrix.node_version }}
|
2020-12-13 14:55:36 +00:00
|
|
|
uses: actions/setup-node@v1
|
|
|
|
with:
|
2020-12-13 15:01:46 +00:00
|
|
|
node-version: ${{ matrix.node_version }}
|
2021-11-22 11:13:16 +00:00
|
|
|
- uses: actions-rs/toolchain@v1
|
2021-11-21 13:25:57 +00:00
|
|
|
with:
|
|
|
|
toolchain: stable
|
2021-11-21 13:28:31 +00:00
|
|
|
profile: minimal
|
2020-12-13 14:55:36 +00:00
|
|
|
- run: yarn
|
2020-12-13 15:01:46 +00:00
|
|
|
- run: yarn test
|