Skip to content

Static Code Checks #1019

Static Code Checks

Static Code Checks #1019

Workflow file for this run

name: Static Code Checks
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
# * is a special character in YAML so you have to quote this string
# at 4 am
- cron: '0 4 * * *'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
checks:
env:
src: "mltb2"
other-src: "tests docs"
runs-on: ubuntu-latest
steps:
# https://github.com/actions/checkout
- uses: actions/checkout@v3
# https://github.com/actions/setup-python
- uses: actions/setup-python@v4
with:
python-version: "3.8"
- name: Install
run: |
curl -sSL https://install.python-poetry.org | python3 -
poetry install --all-extras
- name: Check with black
run: poetry run black ${{ env.src }} ${{ env.other-src }} --check --diff
- name: Check with mdformat
run: poetry run mdformat --check --number .
- name: Check Sphinx doctest
run: poetry run make -C docs doctest