Bump github/codeql-action from 3.28.1 to 3.28.3 #70
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: Test and Build | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
permissions: | |
contents: read | |
jobs: | |
test: | |
permissions: | |
contents: read # for actions/checkout to fetch code | |
pull-requests: read # for SonarSource/sonarcloud-github-action to determine which PR to decorate | |
strategy: | |
# By default, GitHub will maximize the number of jobs run in parallel | |
# depending on the available runners on GitHub-hosted virtual machines. | |
# max-parallel: 8 | |
fail-fast: false | |
matrix: | |
python-version: [ "3.9", "3.10", "3.11", "3.12" ] | |
poetry-version: [ "1.2.2", "1.7.1" ] | |
os: [ ubuntu-22.04, macos-latest, windows-latest ] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 | |
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@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Run image | |
uses: abatilo/actions-poetry@0dd19c9498c3dc8728967849d0d2eae428a8a3d8 # v4 | |
with: | |
poetry-version: ${{ matrix.poetry-version }} | |
- name: Setup environment | |
run: poetry install | |
- name: Show environment | |
run: poetry run pip list | |
- name: Tests | |
run: | | |
poetry run pytest --cov=scan_pdf --cov-report xml:reports/coverage.xml --cov-report term --junitxml=reports/junit.xml | |
head -30 reports/coverage.xml | |
- name: Build | |
run: poetry build | |
- name: SonarCloud Scan | |
if: matrix.python-version == '3.10' && matrix.os == 'ubuntu-22.04' && matrix.poetry-version == '1.7.1' | |
uses: SonarSource/sonarcloud-github-action@02ef91109b2d589e757aefcfb2854c2783fd7b19 # master | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |