2020-11-29 19:52:40 +00:00
|
|
|
name: CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2021-11-22 16:53:54 +00:00
|
|
|
branches: [ main ]
|
2020-11-29 19:52:40 +00:00
|
|
|
pull_request:
|
2021-11-22 16:53:54 +00:00
|
|
|
branches: [ main ]
|
2020-11-29 19:52:40 +00:00
|
|
|
|
|
|
|
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
|
2022-01-02 01:54:57 +00:00
|
|
|
- run: yarn lint:js
|
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
|
2022-01-14 17:44:15 +00:00
|
|
|
- run: yarn # Need to build to get rust bindings
|
2021-12-21 16:52:12 +00:00
|
|
|
- run: yarn --silent ts-node src/Config/Defaults.ts --config | diff config.sample.yml -
|
2021-12-16 15:05:03 +00:00
|
|
|
|
|
|
|
metrics-docs:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Use Node.js
|
|
|
|
uses: actions/setup-node@v1
|
|
|
|
with:
|
|
|
|
node-version: 16
|
|
|
|
- run: yarn --ignore-scripts
|
|
|
|
- run: yarn --silent ts-node ./scripts/build-metrics-docs.ts | diff docs/metrics.md -
|
|
|
|
|
2020-12-13 15:01:46 +00:00
|
|
|
test:
|
2020-12-13 14:55:36 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2022-03-07 20:01:51 +00:00
|
|
|
node_version: [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
|
2021-12-13 13:10:36 +00:00
|
|
|
- run: yarn test
|