Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH Actions: fix the pipeline #564

Merged
merged 5 commits into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions .github/workflows/python-testing.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Python Tests

on:
workflow_dispatch:
push:
branches:
- main
Expand All @@ -25,15 +26,15 @@ jobs:

strategy:
matrix:
python-version: [3.7,3.8,3.9,3.10,3.11,3.12]
python-version: ["3.7","3.8","3.9","3.10","3.11","3.12"]

steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
cache: 'pip'
python-version: '3.11' # Use a default Python version for running tox
- name: Install tox
run: pip install tox
- name: Run tests with tox
run: tox
run: tox
23 changes: 6 additions & 17 deletions .github/workflows/static-analysis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
paths:
- '**/*.py'

workflow_dispatch:
permissions:
contents: read

Expand All @@ -33,30 +34,18 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v5
id: setup_python
- uses: astral-sh/setup-uv@v4
with:
enable-cache: true
cache-dependency-glob: "**/pyproject.toml"
python-version: "3.11.10"

- name: UV Cache
# Manually cache the uv cache directory
# until setup-python supports it:
# https://github.com/actions/setup-python/issues/822
uses: actions/cache@v4
id: cache-uv
with:
path: ~/.cache/uv
key: uvcache-${{ runner.os }}-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('pyproject.toml') }}

- name: Install packages
run: |
python -m pip install -U uv pre-commit
uv pip install --upgrade --system -e .[dev]
uv sync --group dev

- name: Run pre-commit
run: |
pre-commit run --show-diff-on-failure --color=always --all-files
uvx pre-commit run --show-diff-on-failure --color=always --all-files
14 changes: 7 additions & 7 deletions .github/workflows/tach-check.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Tach Check

on:
workflow_dispatch:
pull_request:
paths:
- '**/*.py'
Expand All @@ -12,17 +13,16 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v2
- uses: astral-sh/setup-uv@v4
with:
python-version: '3.11' # Specify the version of Python you need
enable-cache: true
cache-dependency-glob: "**/pyproject.toml"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ".[ci]"
uv sync --group ci

- name: Run Tach
run: tach check
run: uvx tach check
10 changes: 9 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,15 @@
# and then run "tox" from this directory.

[tox]
envlist = py311
env_list =
3.13
3.12
3.11
3.10
3.9
3.8
3.7
; skip_missing_interpreters = true

[testenv]
deps =
Expand Down
Loading