Skip to content

馃 Create config.yml #357

馃 Create config.yml

馃 Create config.yml #357

Workflow file for this run

# This workflow runs the tests and linters
name: tests
on:
push:
branches: [ "*" ]
pull_request:
branches: [ "*" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
test:
strategy:
matrix:
platform: [ ubuntu-latest, windows-latest ]
python-version: [ '3.10', '3.11', '3.12' ]
runs-on: ${{ matrix.platform }}
timeout-minutes: 20
steps:
# Checkout the latest code from the repo
- name: Checkout repo
uses: actions/checkout@v3
# Setup which version of Python to use
- name: Set Up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
# Install dependencies
- name: Install dependencies
run: |
cd backend/
python -m pip install --upgrade pip
pip install --no-cache-dir -r requirements.txt
pip install flake8 pytest
- name: Lint with flake8
run: |
cd backend/
# Stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Run tests
run: |
cd backend/
python -m pytest