Merge pull request #336 from ThomasWaldmann/typos-grammar #27
This file contains hidden or 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
| # 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-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: | |
| # Fetching only the latest commit is not enough for setuptools-scm; fetch full history | |
| 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 |