Will Hunt 5b294bc05f
Add support for a tiered permission system (#167)
* Add basic permission model

* Add permission mapping implementation

* Start integrating config checks

* Add permission checking for commands

* Add warnings for legacy behaviour

* changelog

* Linting

* Fix config build step

* Tests

* Add documentation

* Add complete tests

* Add documentation

* Add room for room membership permissions

* Fixup error

* Update sampleConfig
2022-01-14 17:44:15 +00:00

71 lines
1.7 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:js
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 # Need to build to get rust bindings
- run: yarn --silent ts-node src/Config/Defaults.ts --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