-
Notifications
You must be signed in to change notification settings - Fork 4
45 lines (35 loc) · 1 KB
/
static_checks.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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.9"
- 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