feat: 26 package manager #71
Workflow file for this run
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
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | |
name: CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
test: | |
name: Test | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.9", "3.10", "3.11", "3.12"] | |
# We will use a trick to make torch not install cuda dependencies | |
os: [macos-latest] | |
steps: | |
- name: Checkout code 📂 | |
uses: actions/checkout@v4 | |
- name: Setup Rye 🌾 | |
id: setup-rye | |
uses: eifinger/setup-rye@v3 | |
with: | |
version: "0.35.0" | |
enable-cache: true | |
cache-prefix: ${{ matrix.python-version }} | |
- name: Pin python-version ${{ matrix.python-version }} 📌 | |
if: steps.setup-rye.outputs.cache-hit != 'true' | |
run: rye pin ${{ matrix.python-version }} | |
- name: Install dependencies 🛠️ | |
if: steps.setup-rye.outputs.cache-hit != 'true' | |
run: | | |
rye sync --no-lock | |
- name: Cache pre-commit 📦 | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cache/pre-commit | |
key: pre-commit-${{ runner.os }}-${{ hashFiles('.pre-commit-config.yaml') }} | |
- name: Run pre-commit 🚦 | |
run: | | |
rye run pre-commit run --all-files --show-diff-on-failure --color always | |
- name: Run tests 🧪 | |
run: | | |
rye test | |
- name: Upload coverage report to Codecov 📈 | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: ./coverage.xml | |
flags: unittests |