Skip to content

Make utils functions abstract components #21

Make utils functions abstract components

Make utils functions abstract components #21

Workflow file for this run

name: Tests
on:
pull_request:
branches: [ "main" ]
push:
branches: [ "main" ]
jobs:
pytest:
runs-on: ubuntu-latest
steps:
- name: Install Python Project
uses: CSSUoB/action-install-python-project@v1.0.2
with:
python-version: 3.11
- name: Run pytest
run: poetry run pytest
mypy:
runs-on: ubuntu-latest
steps:
- name: Install Python Project
uses: CSSUoB/action-install-python-project@v1.0.2
with:
python-version: 3.11
- name: Run mypy
run: poetry run mypy .; poetry run mypy ./.github/workflows/scripts
ruff:
runs-on: ubuntu-latest
steps:
- name: Install Python Project
uses: CSSUoB/action-install-python-project@v1.0.2
with:
python-version: 3.11
- name: Run ruff
run: poetry run ruff check . --no-fix --extend-select TD002,TD003
poetry-check:
runs-on: ubuntu-latest
steps:
- name: Install Python Project
uses: CSSUoB/action-install-python-project@v1.0.2
with:
python-version: 3.11
- name: Run poetry check
run: poetry check --no-interaction --lock && poetry check --no-interaction
json-check:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Run JSON Checker
run: IFS=$'\n' && set -f && for f in $(find . -name '*.json'); do if [ -z "$(git check-ignore $f)" ]; then python3 -mjson.tool "$f" > /dev/null || echo "INVALID $f" >&2; fi; done; unset IFS && set +f
pymarkdown:
runs-on: ubuntu-latest
steps:
- name: Install Python Project
uses: CSSUoB/action-install-python-project@v1.0.2
with:
python-version: 3.11
- name: Run PyMarkdown scan
run: poetry run python ./.github/workflows/scripts/remove_invalid_tables.py && poetry run pymarkdown scan . ; poetry run python ./.github/workflows/scripts/remove_invalid_tables.py --restore