2021-11-09 07:15:49 -05:00
|
|
|
name: Mjolnir
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ main ]
|
|
|
|
pull_request:
|
|
|
|
branches: [ main ]
|
2022-11-29 09:02:58 -05:00
|
|
|
schedule:
|
|
|
|
- cron: '20 20 * * *'
|
2021-11-09 07:15:49 -05:00
|
|
|
env:
|
|
|
|
CARGO_TERM_COLOR: always
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
2022-07-06 09:50:33 -04:00
|
|
|
name: Build & Lint
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
|
2023-11-14 15:52:53 -05:00
|
|
|
- name: Specifically use node 18 like in the readme.
|
2022-07-06 09:50:33 -04:00
|
|
|
uses: actions/setup-node@v3
|
|
|
|
with:
|
2023-11-14 15:52:53 -05:00
|
|
|
node-version: '18'
|
2022-07-06 09:50:33 -04:00
|
|
|
- run: yarn install
|
|
|
|
- run: yarn build
|
|
|
|
- run: yarn lint
|
|
|
|
unit:
|
|
|
|
name: Unit tests
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
2023-11-14 15:52:53 -05:00
|
|
|
- name: Specifically use node 18 like in the readme.
|
2022-07-06 09:50:33 -04:00
|
|
|
uses: actions/setup-node@v3
|
|
|
|
with:
|
2023-11-14 15:52:53 -05:00
|
|
|
node-version: '18'
|
2022-07-06 09:50:33 -04:00
|
|
|
- run: yarn install
|
|
|
|
- run: yarn test
|
|
|
|
integration:
|
2021-11-09 07:15:49 -05:00
|
|
|
name: Integration tests
|
|
|
|
runs-on: ubuntu-latest
|
2022-07-06 09:21:33 -04:00
|
|
|
timeout-minutes: 60
|
2021-11-09 07:15:49 -05:00
|
|
|
steps:
|
2022-07-06 09:50:33 -04:00
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: actions/setup-node@v3
|
|
|
|
with:
|
2023-11-14 15:52:53 -05:00
|
|
|
node-version: '18'
|
2022-10-10 11:17:22 -04:00
|
|
|
- name: Fetch and build mx-tester (cached across runs)
|
|
|
|
uses: baptiste0928/cargo-install@v1
|
|
|
|
with:
|
|
|
|
crate: mx-tester
|
|
|
|
version: "0.3.3"
|
2021-11-09 07:15:49 -05:00
|
|
|
- name: Setup image
|
2022-10-10 11:17:22 -04:00
|
|
|
run: RUST_LOG=debug,hyper=info,rusttls=info mx-tester build up
|
2021-11-09 07:15:49 -05:00
|
|
|
- name: Setup dependencies
|
|
|
|
run: yarn install
|
|
|
|
- name: Run tests
|
2022-10-10 11:17:22 -04:00
|
|
|
run: RUST_LOG=debug,hyper=info,rusttls=info mx-tester run
|
|
|
|
- name: Cleanup
|
|
|
|
run: mx-tester down
|
2022-11-15 13:03:06 -05:00
|
|
|
appservice-integration:
|
|
|
|
name: Application Service Integration tests
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
timeout-minutes: 30
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: actions/setup-node@v3
|
|
|
|
with:
|
2023-11-14 15:52:53 -05:00
|
|
|
node-version: '18'
|
2022-11-15 13:03:06 -05:00
|
|
|
- name: Fetch and build mx-tester (cached across runs)
|
|
|
|
uses: baptiste0928/cargo-install@v1
|
|
|
|
with:
|
|
|
|
crate: mx-tester
|
|
|
|
version: "0.3.3"
|
|
|
|
- name: Setup image
|
|
|
|
run: RUST_LOG=debug,hyper=info,rusttls=info mx-tester build up
|
|
|
|
- name: Setup dependencies
|
|
|
|
run: yarn install
|
|
|
|
- name: Run tests
|
|
|
|
run: yarn test:appservice:integration
|
|
|
|
- name: Cleanup
|
|
|
|
run: mx-tester down
|