Skip to content

Merge pull request #64 from golles/go-renovate #136

Merge pull request #64 from golles/go-renovate

Merge pull request #64 from golles/go-renovate #136

Workflow file for this run

name: CI
on: # yamllint disable-line rule:truthy
push:
branches:
- main
pull_request: ~
env:
DEFAULT_PYTHON: "3.13"
DEFAULT_NODE: "22"
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
checks:
strategy:
fail-fast: false
matrix:
include:
- name: mypy
command: uv run mypy .
- name: Prettier
command: npm run prettier -- --check .
- name: Pylint
command: uv run pylint src tests
- name: Ruff linter
command: uv run ruff check --output-format=github .
- name: Ruff formatter
command: uv run ruff format --check .
- name: ShellCheck
command: uv run shellcheck scripts/*.sh
- name: uv lock
command: uv lock --check
- name: YamlLint
command: uv run yamllint --format github .
runs-on: ubuntu-latest
name: ${{ matrix.name }}
steps:
- name: Check out code from GitHub
uses: actions/checkout@v4
- name: Setup environment
uses: ./.github/actions/setup-env
with:
python-version: ${{ env.DEFAULT_PYTHON }}
node-version: ${{ env.DEFAULT_NODE }}
- name: Run ${{ matrix.name }}
run: ${{ matrix.command }}
tests:
runs-on: ubuntu-latest
needs:
- checks
name: Tests
steps:
- name: Check out code from GitHub
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch full history for all SonarCloud features.
- name: Setup environment
uses: ./.github/actions/setup-env
with:
python-version: ${{ env.DEFAULT_PYTHON }}
node-version: ${{ env.DEFAULT_NODE }}
- name: Run tests
run: uv run pytest
- name: Make coverage XML report
run: uv run coverage xml
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
- name: SonarCloud Scan
if: github.event.repository.private == false && github.event.pull_request.head.repo.fork == false
uses: sonarsource/sonarqube-scan-action@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}