Upgrade metadata to 3.2.1a1 (and other dependencies) #48
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
# Workflow name | |
name: PyTest, Black, Pylint and Mypy | |
# Controls when the workflow will run | |
on: | |
# Triggers the workflow on pull request (on main and develop only) events | |
pull_request: | |
branches: | |
- main | |
- develop | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
# This workflow contains a single job called "tests" | |
tests: | |
# The type of runner that the job will run on and timeout in minutes | |
name: Run Python Tests, Black formatter, Pylint and Mypy | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
# Include a strategy matrix in order to allow the job to run multiple times with different versions of Python | |
strategy: | |
matrix: | |
python-version: ["3.10"] | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out our repository under $GITHUB_WORKSPACE, so our job can access it | |
- name: Check out repository code | |
uses: actions/checkout@v3 | |
# Set up Python version from the matrix | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
# Runs a set of commands installing Python dependencies using the runners shell (Run a multi-line script) | |
- name: Install Python dependencies | |
run: | | |
python3 -m pip install --upgrade pip | |
pip3 install -r requirements-dev.txt | |
# Run unit tests | |
- name: Test with pytest | |
run: | | |
export META_CLASSIFIER_PATH=$PWD/docs/metadata_classifiers/ | |
pytest --exitfirst --verbose --failed-first | |
# Check code has been formatted | |
- name: Run Black code formatter | |
run: | | |
black . --check --verbose --diff --color | |
# Run Pylint | |
- name: Run Pylint | |
run: | | |
pylint $(git ls-files '*.py') --fail-under=9.5 | |
# Run Mypy | |
- name: Run Mypy type checker | |
run: | | |
mypy graphql_service |