fazedordecodigo execute Tests #221
Workflow file for this run
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
name: Tests | |
run-name: ${{ github.actor }} execute Tests | |
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.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.13' && matrix.os == 'ubuntu-latest' | |
uses: SonarSource/sonarqube-scan-action@v5 | |
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 }} |