code tags #360
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: ontobot-change-agent qc | |
on: | |
# Triggers the workflow on push or pull request events but only for the master branch | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
python-version: ["3.9"] | |
os: [ ubuntu-latest ] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
pip install tox | |
- name: Check code quality with flake8 | |
run: tox -e flake8 | |
- name: Run mypy check. | |
run: tox -e mypy | |
- name: Run docstring coverage | |
run: tox -e docstr-coverage | |
#---------------------------------------------- | |
# install & configure poetry | |
#---------------------------------------------- | |
- name: Install Poetry | |
run: pip install poetry | |
#---------------------------------------------- | |
# install dependencies if cache does not exist | |
#---------------------------------------------- | |
- name: Install dependencies | |
run: | | |
poetry install --no-interaction | |
- name: Run tests | |
run: | | |
echo ${{ secrets.GH_TOKEN }} >> ${GITHUB_WORKSPACE}/src/ontobot_change_agent/token.txt | |
poetry run pytest |