Debian Codegraph @

.github/workflows/test.yml

raw symbols SCIP
1 name: Build and Test
2
3 on:
4 merge_group:
5 pull_request:
6 types:
7 - opened
8 - synchronize
9 push:
10 branches:
11 - master
12
13 permissions:
14 contents: read
15
16 concurrency:
17 group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
18 cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
19
20 jobs:
21 run:
22 name: Run
23 runs-on: ubuntu-latest
24
25 env:
26 BUBBLEWRAP_ARGUMENTS: |
27 --unshare-all \
28 --clearenv \
29 --ro-bind / / \
30 --bind ${{ github.workspace }} ${{ github.workspace }} \
31 --tmpfs $HOME \
32 --tmpfs /tmp \
33 --tmpfs /var \
34 --dev /dev \
35 --proc /proc \
36 --die-with-parent \
37 --new-session \
38
39 strategy:
40 matrix:
41 python-version: ["3.10", "3.11", "3.12", "3.13"]
42
43 steps:
44 - name: Checkout code
45 uses: actions/checkout@v5
46 with:
47 ref: ${{ github.event.pull_request.head.sha || github.ref }}
48
49 - name: Configure Python ${{ matrix.python-version }}
50 uses: actions/setup-python@v6
51 with:
52 python-version: "${{ matrix.python-version }}"
53
54 - name: Configure dependencies
55 run: |
56 sudo apt install bubblewrap
57 pip install --user --upgrade pip
58 pip install --user pipx
59 pip install --user setuptools
60 pipx ensurepath
61 pipx install poetry
62 poetry config virtualenvs.in-project true
63 poetry install --with dev
64 poetry self add "poetry-dynamic-versioning[plugin]"
65
66 - name: Run tests
67 run: |
68 poetry run pytest --cov=auth0 --cov-report=term-missing:skip-covered --cov-report=xml
69
70 # - name: Run lint
71 # run: |
72 # pipx install black==23.3.0
73 # pipx install flake8==5.0.4
74 # pipx install isort==5.11.5
75 # pipx install pyupgrade==3.3.2
76 # black . --check
77 # flake8 . --count --show-source --statistics
78 # isort . --diff --profile black
79 # pyupgrade . --py37-plus --keep-runtime-typing
80
81 - if: ${{ matrix.python-version == '3.10' }}
82 name: Upload coverage
83 uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # [email protected]
84 with:
85 token: ${{ secrets.CODECOV_TOKEN }}