1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98
|
# badge: https://github.com/bepasty/bepasty-server/workflows/CI/badge.svg?branch=master
name: CI
on:
push:
branches: [ master ]
paths:
- '**.py'
- '**.yml'
- '**.toml'
- '**.cfg'
- '**.ini'
- 'requirements.d/*'
- '!docs/**'
pull_request:
branches: [ master ]
paths:
- '**.py'
- '**.yml'
- '**.toml'
- '**.cfg'
- '**.ini'
- 'requirements.d/*'
- '!docs/**'
jobs:
lint:
runs-on: ubuntu-24.04
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.12'
- name: Lint with flake8
run: |
pip install flake8-pyproject flake8
flake8 src scripts
pytest:
needs: lint
strategy:
matrix:
include:
- os: ubuntu-22.04
python-version: '3.8'
toxenv: py38
- os: ubuntu-24.04
python-version: '3.9'
toxenv: py39
- os: ubuntu-24.04
python-version: '3.10'
toxenv: py310
- os: ubuntu-24.04
python-version: '3.11'
toxenv: py311
- os: ubuntu-24.04
python-version: '3.12'
toxenv: py312
- os: ubuntu-24.04
python-version: '3.13'
toxenv: py313
env:
TOXENV: ${{ matrix.toxenv }}
runs-on: ${{ matrix.os }}
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
with:
# just fetching 1 commit is not enough for setuptools-scm, so we fetch all
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Python requirements
run: |
python -m pip install --upgrade pip setuptools wheel
pip install -r requirements.d/dev.txt
- name: run pytest via tox
run: |
tox --skip-missing-interpreters
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
env:
OS: ${{ runner.os }}
python: ${{ matrix.python-version }}
with:
env_vars: OS, python
|