Bump actions/setup-python from 5.3.0 to 5.4.0 #85
This file contains 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: Build | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
permissions: | |
contents: read | |
jobs: | |
build: | |
permissions: | |
contents: read # for actions/checkout to fetch code | |
pull-requests: read # for SonarSource/sonarcloud-github-action to determine which PR to decorate | |
name: Build | |
strategy: | |
matrix: | |
python-version: [ "3.10", "3.11", "3.12", "3.13" ] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4 | |
with: | |
egress-policy: audit | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Set poetry | |
uses: abatilo/actions-poetry@0dd19c9498c3dc8728967849d0d2eae428a8a3d8 # v4 | |
with: | |
poetry-version: '2.0.1' | |
- name: Setup environment | |
run: poetry install | |
- name: Run Tests | |
run: | | |
poetry run pytest --cov blitzortung --cov-report xml --cov-report term --junitxml=junit.xml tests | |
- name: Build | |
run: | | |
poetry build | |
- name: SonarCloud Scan | |
if: matrix.python-version == '3.10' && matrix.poetry-version == '1.7.1' | |
uses: SonarSource/sonarqube-scan-action@v4.2.1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |