Skip to content

Added link to release in CHANGELOG.md #42

Added link to release in CHANGELOG.md

Added link to release in CHANGELOG.md #42

Workflow file for this run

name: CI
on:
workflow_dispatch: # Manually trigger a workflow run using the GitHub API, GitHub CLI, or the GitHub UI.
push:
pull_request:
release:
types: [published]
permissions:
contents: read # required for code coverage
jobs:
download-test-model:
name: download-test-model
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v5
- name: Set up Python 3.13
uses: actions/setup-python@v6
id: python-setup
with:
python-version: 3.13
- name: Install uv
uses: astral-sh/setup-uv@v7
id: setup-uv
with:
# Install a specific version of uv.
version: "0.9.10"
enable-cache: true
restore-cache: true
save-cache: true
prune-cache: true
cache-dependency-glob: "uv.lock"
- name: Install the project
run: uv sync --locked
- name: check uv cache is working
if: steps.setup-uv.outputs.cache-hit == 'true'
run: echo "uv cache was restored"
- name: Check HF model cache
uses: actions/cache/restore@v4
id: cache
with:
path: ~/hf_test_model_cache
key: ettin-17m-model-${{ runner.os }}
- name: Download HuggingFace test model
if: steps.cache.outputs.cache-hit != 'true'
run: uv run tests/model_download.py $HOME/hf_test_model_cache
- name: Saving HuggingFace test model
uses: actions/cache/save@v4
if: steps.cache.outputs.cache-hit != 'true'
with:
path: ~/hf_test_model_cache
key: ettin-17m-model-${{ runner.os }}
checks:
name: checks
needs:
- download-test-model
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
os: [ubuntu-latest, macos-latest, windows-latest]
env:
HF_HOME: /path/to/cache_root
steps:
- uses: actions/checkout@v5
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
id: python-setup
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v7
id: setup-uv
with:
# Install a specific version of uv.
version: "0.9.10"
enable-cache: true
restore-cache: true
save-cache: true
prune-cache: true
cache-dependency-glob: "uv.lock"
- name: Install the project
run: uv sync --locked
- name: check uv cache is working
if: steps.setup-uv.outputs.cache-hit == 'true'
run: echo "uv cache was restored"
- name: isort
run: uv run isort --check-only src tests
- name: flake8
run: |
uv run flake8 --config .flake8 src tests
- name: Cache mypy
uses: actions/cache@v4
with:
path: ./.mypy_cache
key: ${{ runner.os }}-${{ steps.python-setup.outputs.python-version }}-${{ hashFiles('uv.lock') }}
- name: mypy
run: uv run mypy
- name: Windows create HuggingFace Hub cache directory
if: ${{ runner.os == 'Windows' }}
run: |
mkdir "$HOME\.cache"
mkdir "$HOME\.cache\huggingface"
mkdir "$HOME\.cache\huggingface\hub"
echo "HF_HOME=$HOME\.cache\huggingface" >> $env:GITHUB_ENV
- name: Linux create HuggingFace Hub cache directory
if: ${{ runner.os == 'macOS' || runner.os == 'Linux' }}
run: |
mkdir -p $HOME/.cache/huggingface/hub
echo "HF_HOME=$HOME/.cache/huggingface" >> "$GITHUB_ENV"
- name: Get HF model cache
uses: actions/cache/restore@v4
with:
path: ~/hf_test_model_cache
key: ettin-17m-model-${{ runner.os }}
lookup-only: false
- name: Move cached files
run: mv $HOME/hf_test_model_cache/* $HOME/.cache/huggingface/hub/.
- name: Code coverage testing
run: |
uv run coverage run
- name: Code coverage report
run: |
uv run coverage