Prettify output report tabulate #10
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
# reference: https://github.com/smarlhens/python-boilerplate/blob/main/.github/workflows/pr.yml | |
name: ci | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
env: | |
UV_VERSION: "0.5.1" | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
env: | |
UV_CACHE_DIR: /tmp/.uv-cache | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Checkout source code | |
uses: actions/checkout@v4 | |
- name: Set up python | |
id: setup-python | |
uses: actions/setup-python@v5 | |
with: | |
python-version-file: ".python-version" | |
- name: Set up uv | |
run: curl -LsSf https://astral.sh/uv/${{ env.UV_VERSION }}/install.sh | sh | |
- name: Restore uv cache | |
uses: actions/cache@v4 | |
with: | |
path: /tmp/.uv-cache | |
key: uv-${{ runner.os }}-${{ hashFiles('uv.lock') }} | |
restore-keys: | | |
uv-${{ runner.os }}-${{ hashFiles('uv.lock') }} | |
uv-${{ runner.os }} | |
- name: Install dependencies | |
run: uv sync --all-extras --dev --frozen | |
- name: Check format | |
run: ./format.sh check | |
- name: Test with pytest | |
run: uv run pytest --cov=src | |
- name: Minimize uv cache | |
run: uv cache prune --ci |