-
-
Notifications
You must be signed in to change notification settings - Fork 6
63 lines (56 loc) · 1.72 KB
/
Copy pathtests.yml
File metadata and controls
63 lines (56 loc) · 1.72 KB
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
name: Tests
run-name: ${{ github.actor }} execute Tests
permissions:
contents: read
on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
steps:
name: test with ${{ matrix.env }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
env:
- "3.14"
- "3.13"
- "3.12"
- "3.11"
os:
- ubuntu-latest
- macos-latest
- windows-latest
steps:
- name: Realiza o checkout
uses: actions/checkout@v4
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
cache-dependency-glob: "pyproject.toml"
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Add .local/bin to Windows PATH
if: runner.os == 'Windows'
shell: bash
run: echo "$USERPROFILE/.local/bin" >> $GITHUB_PATH
- name: Install tox
run: uv tool install tox --with tox-uv
- name: Install Python
run: uv python install --python-preference only-managed ${{ matrix.env }}
- name: Run test suite
run: tox r -e py${{ matrix.env }}
- name: SonarCloud Scan
if: matrix.env == '3.14' && matrix.os == 'ubuntu-latest'
uses: SonarSource/sonarqube-scan-action@v6
with:
args: >
-Dsonar.organization=fazedordecodigo
-Dsonar.projectKey=fazedordecodigo_PyFlunt
-Dsonar.python.coverage.reportPaths=coverage.xml
-Dsonar.sources=flunt/
-Dsonar.tests=tests/
-Dsonar.test.exclusions=tests/**
-Dsonar.verbose=true
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}