Skip to content

Bump actions/setup-python from 5.1.0 to 5.2.0 #41

Bump actions/setup-python from 5.1.0 to 5.2.0

Bump actions/setup-python from 5.1.0 to 5.2.0 #41

Workflow file for this run

name: CI
on:
push:
branches:
- main
- dev
pull_request:
env:
DEFAULT_PYTHON: "3.12"
jobs:
code-quality:
runs-on: "ubuntu-latest"
name: Check code quality
steps:
- uses: "actions/checkout@v4"
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
id: python
uses: actions/setup-python@v5.2.0
with:
python-version: ${{ env.DEFAULT_PYTHON }}
cache: "pip"
cache-dependency-path: "requirements*"
- name: Install dependencies
run: |
pip install -r requirements.txt
pip install -r requirements_test.txt
# Following steps cannot run by pre-commit.ci as repo = local
- name: Run mypy
run: mypy osservaprezzi/
- name: Pylint review
run: pylint osservaprezzi/
tests:
runs-on: "ubuntu-latest"
name: Run tests
strategy:
matrix:
python-version: ["3.12"]
steps:
- uses: "actions/checkout@v4"
- name: Set up Python ${{ matrix.python-version }}
id: python
uses: actions/setup-python@v5.2.0
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
cache-dependency-path: "requirements*"
- name: Install dependencies
run: |
pip install -r requirements.txt
pip install -r requirements_test.txt
- name: Run pytest
run: pytest --cov=. --cov-config=.coveragerc --cov-report xml:coverage.xml
- name: SonarCloud scan
uses: sonarsource/sonarcloud-github-action@master
if: (github.event.sender.login == github.event.repository.owner.login) && (github.repository == 'lnx85/osservaprezzi.py')
env:
GITHUB_TOKEN: ${{ secrets.GIT_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}