File: tests.yml

package info (click to toggle)
flask-openapi3 4.3.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,224 kB
  • sloc: python: 4,802; makefile: 14; javascript: 5
file content (56 lines) | stat: -rw-r--r-- 1,203 bytes parent folder | download
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
name: tests

on:
  push:
    branches: [ master ]
    paths-ignore:
      - "docs/**"
      - "*.md"
      - "*.rst"

  pull_request:
    branches: [ master ]
    paths-ignore:
      - "docs/**"
      - "*.md"
      - "*.rst"

jobs:
  tests:
    runs-on: ubuntu-latest

    strategy:
      max-parallel: 5
      matrix:
        python-version: [ "3.10", "3.11", "3.12", "3.13", "3.14" ]
        flask-version: [ "Flask>=2.0,<3.0", "Flask>=3.0" ]
    env:
      PYTHONPATH: .

    steps:
      - uses: actions/checkout@v6

      - uses: astral-sh/setup-uv@v7
        with:
          python-version: ${{ matrix.python-version }}
          enable-cache: true

      - name: Install dependencies
        run: |
          uv sync --upgrade --all-extras --all-groups
          uv add "${{ matrix.flask-version }}"

      - name: Test with pytest
        run: uv run pytest tests

      - name: ruff
        run: uv run ruff check flask_openapi3 tests examples

      - name: Cache mypy
        uses: actions/cache@v5
        with:
          path: ./.mypy_cache
          key: mypy|${{ matrix.python-version }}|${{ hashFiles('pyproject.toml') }}

      - name: Run mypy
        run: uv run mypy flask_openapi3