mirror of
https://github.com/matrix-org/matrix-hookshot.git
synced 2025-03-10 21:19:13 +00:00

* Add support for prometheus metrics * Automatically build metrics documentation * Slight linter tidyup * add changelog * fix workflow * hush yarn
71 lines
1.6 KiB
YAML
71 lines
1.6 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [ main ]
|
|
pull_request:
|
|
branches: [ main ]
|
|
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
lint-node:
|
|
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 lint
|
|
lint-rust:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: stable
|
|
profile: minimal
|
|
components: rustfmt
|
|
- run: cargo fmt --all -- --check
|
|
config:
|
|
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 && yarn build:app
|
|
- run: node lib/Config/Defaults.js --config | diff config.sample.yml -
|
|
|
|
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 -
|
|
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
node_version: [12, 14, 16]
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Use Node.js ${{ matrix.node_version }}
|
|
uses: actions/setup-node@v1
|
|
with:
|
|
node-version: ${{ matrix.node_version }}
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: stable
|
|
profile: minimal
|
|
- run: yarn
|
|
- run: yarn test
|