Skip to content

Add doc section for auth media #187

Add doc section for auth media

Add doc section for auth media #187

Workflow file for this run

name: Linting and Tests
on:
push:
branches: ["main"]
pull_request:
jobs:
check-code-style:
name: Check code style
runs-on: ubuntu-latest
steps:
- run: sudo apt-get install -y libmagic1
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Setup Poetry
uses: matrix-org/setup-python-poetry@v1
with:
install-project: "false"
- name: Run ruff check
run: poetry run ruff check --output-format=github .
- name: Run ruff format
run: poetry run ruff format --check .
check-types:
name: Check types with Mypy
runs-on: ubuntu-latest
steps:
- run: sudo apt-get install -y libmagic1
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/[email protected]
- uses: Swatinem/rust-cache@v2
- name: Setup Poetry
uses: matrix-org/setup-python-poetry@v1
with:
# We have seen odd mypy failures that were resolved when we started
# installing the project again:
# https://github.com/matrix-org/synapse/pull/15376#issuecomment-1498983775
# To make CI green, err towards caution and install the project.
install-project: "true"
# Cribbed from
# https://github.com/AustinScola/mypy-cache-github-action/blob/85ea4f2972abed39b33bd02c36e341b28ca59213/src/restore.ts#L10-L17
- name: Restore/persist mypy's cache
uses: actions/cache@v4
with:
path: |
.mypy_cache
key: mypy-cache-${{ github.context.sha }}
restore-keys: mypy-cache-
- name: Run mypy
run: poetry run mypy
unit-tests:
name: Unit tests
runs-on: ubuntu-latest
strategy:
matrix:
# Run the unit tests both against our oldest supported Python version
# and the newest stable.
python_version: [ "3.10", "3.12" ]
steps:
- run: sudo apt-get install -y libmagic1
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python_version }}
- run: python -m pip install tox "poetry==1.8.3"
- run: tox -e py