80 lines
2.0 KiB
YAML
80 lines
2.0 KiB
YAML
name: Tests
|
|
|
|
on:
|
|
push:
|
|
branches: ["develop", "release-*"]
|
|
pull_request:
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
check-sampleconfig:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-python@v2
|
|
- run: pip install .
|
|
- run: scripts-dev/generate_sample_config.sh --check
|
|
- run: scripts-dev/config-lint.sh
|
|
|
|
check-schema-delta:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-python@v2
|
|
- run: "pip install 'click==8.1.1' 'GitPython>=3.1.20'"
|
|
- run: scripts-dev/check_schema_delta.py --force-colors
|
|
|
|
lint:
|
|
uses: "matrix-org/backend-meta/.github/workflows/python-poetry-ci.yml@try-newer-actions"
|
|
with:
|
|
typechecking-extras: "all"
|
|
|
|
lint-crlf:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Check line endings
|
|
run: scripts-dev/check_line_terminators.sh
|
|
|
|
lint-pydantic:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
ref: ${{ github.event.pull_request.head.sha }}
|
|
fetch-depth: 0
|
|
- uses: matrix-org/setup-python-poetry@dmr/try-newer-actions
|
|
with:
|
|
extras: "all"
|
|
- run: poetry run scripts-dev/check_pydantic_models.py
|
|
|
|
# Dummy step to gate other tests on without repeating the whole list
|
|
linting-done:
|
|
if: ${{ !cancelled() }} # Run this even if prior jobs were skipped
|
|
needs: [lint, lint-crlf, lint-pydantic, check-sampleconfig, check-schema-delta]
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- run: "true"
|
|
|
|
# a job which marks all the other jobs as complete, thus allowing PRs to be merged.
|
|
tests-done:
|
|
if: ${{ always() }}
|
|
needs:
|
|
- check-sampleconfig
|
|
- lint
|
|
- lint-crlf
|
|
- trial
|
|
- trial-olddeps
|
|
- sytest
|
|
- export-data
|
|
- portdb
|
|
- complement
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: matrix-org/done-action@v2
|
|
with:
|
|
needs: ${{ toJSON(needs) }}
|