Merge branch 'main' into wip/dev-2560-lint-xml-models #1420
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Tests on Push | |
on: | |
push: | |
branches-ignore: | |
- main | |
jobs: | |
tests-on-push: | |
runs-on: ubuntu-latest | |
steps: | |
# Checkout source, install Python, install dependencies | |
###################################################### | |
- name: Checkout source | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Install poetry | |
run: | | |
curl -sSL https://install.python-poetry.org | python3 - | |
poetry self add poetry-exec-plugin | |
- name: Set up Python 3.11 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.11 | |
# attempt to restore dependencies from cache (if successful, the following `poetry install` will be a no-op) | |
cache: poetry | |
- name: Install Python dependencies | |
run: poetry install | |
# Build and check docs | |
###################### | |
- name: build docs | |
run: poetry run mkdocs build --strict | |
- name: check external links in docs | |
run: | | |
npm install -g markdown-link-validator | |
poetry exec check-links | |
- name: markdownlint | |
run: docker run -v $PWD:/workdir ghcr.io/igorshubovych/markdownlint-cli:latest --config .markdownlint.yml --ignore CHANGELOG.md "**/*.md" | |
# Code Linting | |
############## | |
- name: Linting with Pylint | |
run: poetry run pylint src test | |
- name: Linting with mypy | |
run: poetry run mypy . | |
- name: Linting with black | |
run: poetry run black --check . | |
- name: Linting with darglint | |
run: poetry exec darglint | |
# Install programs for local processing (fast xmlupload) | |
######################################################## | |
- name: Fast xmlupload - Install ffmpeg | |
uses: FedericoCarboni/setup-ffmpeg@v2 | |
- name: Fast xmlupload - ImageMagick - look for cached AppImage | |
# If a cache is found that matches "key", the cached files are restored to "path". | |
# If no cache is found, this step is skipped, and when all jobs are done, the files in "path" are cached under "key". | |
id: search-cached-imagemagick | |
uses: actions/cache@v3 | |
with: | |
path: ~/bin/magick # AppImage containing all binaries + dependencies | |
key: imagemagick # don't check for a new version, because version checking is fairly complex | |
- name: Fast xmlupload - ImageMagick - Installation | |
if: ${{ steps.search-cached-imagemagick.outputs.cache-hit != 'true' }} | |
uses: mfinelli/setup-imagemagick@v2 # downloads the "magick" AppImage to ~/bin/magick | |
# Run unittests and e2e tests | |
############################# | |
- name: unittests | |
run: poetry run pytest test/unittests/ | |
- name: start stack | |
run: poetry run dsp-tools start-stack --no-prune | |
- name: e2e tests | |
run: poetry run pytest test/e2e/ | |
- name: stop stack # see if this command can run (it isn't tested anywhere else) | |
run: poetry run dsp-tools stop-stack |