chore: update CHANGELOG #124
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: check | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
merge_group: | |
permissions: | |
contents: read | |
env: | |
MINIMUM_PYTHON_VERSION: "3.10" | |
UV_VERSION: "0.4.18" | |
UV_CACHE_DIR: /tmp/.uv-cache | |
# If new code is pushed to a PR branch, then cancel in progress workflows for that PR. Ensures that | |
# we don't waste CI time, and returns results quicker https://github.com/jonhoo/rust-ci-conf/pull/5 | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
fmt: | |
runs-on: ubuntu-latest | |
name: ubuntu / 3.10 / fmt | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Set up the python ${{ env.MINIMUM_PYTHON_VERSION }} | |
uses: actions/setup-python@v5 | |
id: setup-python | |
with: | |
python-version: ${{ env.MINIMUM_PYTHON_VERSION }} | |
#---------------------------------------------- | |
# ----- setup uv and load cache ----- | |
#---------------------------------------------- | |
- 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: Load cached venv | |
id: cached-venv | |
uses: actions/cache@v4 | |
with: | |
path: .venv | |
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/pyproject.toml') }}-${{ hashFiles('**/uv.lock') }} | |
- name: Install dependencies | |
if: steps.cached-venv.outputs.cache-hit != 'true' | |
run: make install-dev | |
- name: check formatting | |
run: make check-fmt | |
- name: Minimize uv cache | |
run: uv cache prune --ci | |
lint: | |
runs-on: ubuntu-latest | |
name: ubuntu / 3.10 / lint | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Set up the python ${{ env.MINIMUM_PYTHON_VERSION }} | |
uses: actions/setup-python@v5 | |
id: setup-python | |
with: | |
python-version: ${{ env.MINIMUM_PYTHON_VERSION }} | |
#---------------------------------------------- | |
# ----- setup uv and load cache ----- | |
#---------------------------------------------- | |
- 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: Load cached venv | |
id: cached-venv | |
uses: actions/cache@v4 | |
with: | |
path: .venv | |
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/pyproject.toml') }}-${{ hashFiles('**/uv.lock') }} | |
- name: Install dependencies | |
if: steps.cached-venv.outputs.cache-hit != 'true' | |
run: make install-dev | |
- name: lint code | |
run: make lint | |
- name: Minimize uv cache | |
run: uv cache prune --ci | |
type-check: | |
runs-on: ubuntu-latest | |
name: ubuntu / 3.10 / type-check | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Set up the python ${{ env.MINIMUM_PYTHON_VERSION }} | |
uses: actions/setup-python@v5 | |
id: setup-python | |
with: | |
python-version: ${{ env.MINIMUM_PYTHON_VERSION }} | |
#---------------------------------------------- | |
# ----- setup uv and load cache ----- | |
#---------------------------------------------- | |
- 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: Load cached venv | |
id: cached-venv | |
uses: actions/cache@v4 | |
with: | |
path: .venv | |
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/pyproject.toml') }}-${{ hashFiles('**/uv.lock') }} | |
- name: Install dependencies | |
if: steps.cached-venv.outputs.cache-hit != 'true' | |
run: make install-dev | |
- name: type-check code | |
run: make type-check | |
- name: Minimize uv cache | |
run: uv cache prune --ci | |
# https://github.com/marketplace/actions/alls-green#why used for branch protection checks | |
check-check: | |
if: always() | |
needs: | |
- fmt | |
- lint | |
- type-check | |
runs-on: ubuntu-latest | |
permissions: {} | |
steps: | |
- name: Decide whether the needed jobs succeeded or failed | |
uses: re-actors/alls-green@release/v1 | |
with: | |
jobs: ${{ toJSON(needs) }} | |
allowed-failures: upload-coverage |