🚀 Lock file maintenance #78
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: CI | |
on: | |
push: | |
branches: | |
- main | |
- dev | |
pull_request: | |
workflow_dispatch: | |
env: | |
UV_CACHE_DIR: /tmp/.uv-cache | |
PROJECT_PATH: "vm_clockify" | |
jobs: | |
code-quality: | |
name: Check code quality | |
runs-on: ubuntu-latest | |
steps: | |
# https://github.com/actions/checkout | |
- name: ⤵️ Checkout repository | |
uses: actions/checkout@v4 | |
# https://github.com/astral-sh/setup-uv | |
- name: 🏗 Install uv and Python | |
uses: astral-sh/setup-uv@v5 | |
with: | |
enable-cache: true | |
cache-dependency-glob: "uv.lock" | |
cache-local-path: ${{ env.UV_CACHE_DIR }} | |
python-version: "3.13" | |
- name: 🏗 Install the project | |
run: uv sync --locked --dev | |
- name: Run mypy | |
run: uv run --frozen mypy ${{ env.PROJECT_PATH }}/ | |
- name: Pylint review | |
run: uv run --frozen pylint ${{ env.PROJECT_PATH }}/ | |
# tests: | |
# name: Run tests | |
# runs-on: ubuntu-latest | |
# strategy: | |
# matrix: | |
# python-version: | |
# - "3.12" | |
# - "3.13" | |
# steps: | |
# # https://github.com/actions/checkout | |
# - name: ⤵️ Checkout repository | |
# uses: actions/checkout@v4 | |
# # https://github.com/astral-sh/setup-uv | |
# - name: 🏗 Install uv and Python ${{ matrix.python-version }} | |
# uses: astral-sh/setup-uv@v4 | |
# with: | |
# enable-cache: true | |
# cache-dependency-glob: "uv.lock" | |
# cache-local-path: ${{ env.UV_CACHE_DIR }} | |
# python-version: ${{ matrix.python-version }} | |
# - name: 🏗 Install the project | |
# run: uv sync --locked --dev | |
# - name: Run pytest | |
# run: uv run --frozen pytest tests --cov=./ --cov-report=xml --junitxml=pytest-report.xml | |
# # https://github.com/actions/upload-artifact | |
# - name: Upload test report | |
# uses: actions/upload-artifact@v4 | |
# with: | |
# name: pytest-report-${{ matrix.python-version }} | |
# path: pytest-report.xml | |
# # # https://github.com/codecov/codecov-action | |
# # - name: Upload coverage to Codecov | |
# # uses: codecov/codecov-action@v5 | |
# # with: | |
# # token: ${{ secrets.CODECOV_TOKEN }} | |
# # fail_ci_if_error: true |