Skip to content
This repository has been archived by the owner on Sep 16, 2023. It is now read-only.

Merge pull request #102 from litestar-org/dependabot/pip/certifi-2023… #203

Merge pull request #102 from litestar-org/dependabot/pip/certifi-2023…

Merge pull request #102 from litestar-org/dependabot/pip/certifi-2023… #203

Workflow file for this run

name: ci
on:
pull_request:
push:
branches:
- main
jobs:
validate:
runs-on: ubuntu-latest
env:
SETUPTOOLS_USE_DISTUTILS: stdlib
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install Pre-Commit
run: python -m pip install pre-commit && pre-commit install
- name: Load cached Pre-Commit Dependencies
id: cached-pre-commit-dependencies
uses: actions/cache@v3
with:
path: ~/.cache/pre-commit/
key: pre-commit|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }}
- name: Execute Pre-Commit
run: pre-commit run --show-diff-on-failure --color=always --all-files
test:
strategy:
fail-fast: true
matrix:
python-version: [ "3.9", "3.10", "3.11" ]
uses: ./.github/workflows/test.yaml
with:
python-version: ${{ matrix.python-version }}
coverage: ${{ matrix.python-version == '3.11' }}
sonar:
needs: test
if: github.event.pull_request.head.repo.fork == false && github.repository_owner == 'litestar-org'
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Download Artifacts
uses: actions/download-artifact@v3
with:
name: coverage-xml
- name: Fix coverage file for sonarcloud
run: sed -i "s/home\/runner\/work\/litestar-hello-world\/app/github\/workspace/g" coverage.xml
- name: SonarCloud Scan
uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}