File: test.yml

package info (click to toggle)
auth0-python 4.13.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,280 kB
  • sloc: python: 8,933; makefile: 15; sh: 2
file content (85 lines) | stat: -rw-r--r-- 2,313 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
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
name: Build and Test

on:
  merge_group:
  pull_request:
    types:
      - opened
      - synchronize
  push:
    branches:
      - master

permissions:
  contents: read

concurrency:
  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
  cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}

jobs:
  run:
    name: Run
    runs-on: ubuntu-latest

    env:
      BUBBLEWRAP_ARGUMENTS: |
        --unshare-all \
        --clearenv \
        --ro-bind / / \
        --bind ${{ github.workspace }} ${{ github.workspace }} \
        --tmpfs $HOME \
        --tmpfs /tmp \
        --tmpfs /var \
        --dev /dev \
        --proc /proc \
        --die-with-parent \
        --new-session \

    strategy:
      matrix:
        python-version: ["3.9", "3.10", "3.11", "3.12"]

    steps:
      - name: Checkout code
        uses: actions/checkout@v5
        with:
          ref: ${{ github.event.pull_request.head.sha || github.ref }}

      - name: Configure Python ${{ matrix.python-version }}
        uses: actions/setup-python@v6
        with:
          python-version: "${{ matrix.python-version }}"

      - name: Configure dependencies
        run: |
          sudo apt install bubblewrap
          pip install --user --upgrade pip
          pip install --user pipx
          pip install --user setuptools
          pipx ensurepath
          pipx install poetry
          poetry config virtualenvs.in-project true
          poetry install --with dev
          poetry self add "poetry-dynamic-versioning[plugin]"

      - name: Run tests
        run: |
          poetry run pytest --cov=auth0 --cov-report=term-missing:skip-covered --cov-report=xml

      # - name: Run lint
      #   run: |
      #     pipx install black==23.3.0
      #     pipx install flake8==5.0.4
      #     pipx install isort==5.11.5
      #     pipx install pyupgrade==3.3.2
      #     black . --check
      #     flake8 . --count --show-source --statistics
      #     isort .  --diff --profile black
      #     pyupgrade .  --py37-plus --keep-runtime-typing

      - if: ${{ matrix.python-version == '3.10' }}
        name: Upload coverage
        uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # pin@5.5.1
        with:
          token: ${{ secrets.CODECOV_TOKEN }}