Skip to content

Commit f4c0719

Browse files
committed
Various updates to try and get ci to pass with a more consistent env on github actions
1 parent 534bb4c commit f4c0719

File tree

6 files changed

+921
-33
lines changed

6 files changed

+921
-33
lines changed

.github/actions/install_requirements/action.yml

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ inputs:
44
python-version:
55
description: Python version to install, default is from Dockerfile
66
default: "dev"
7-
pip-install:
8-
description: Parameters to pass to pip install
9-
default: "$([ -f dev-requirements.txt ] && echo '-c dev-requirements.txt') -e .[dev]"
7+
poetry-version:
8+
description: Poetry version to install, from pyproject.toml
9+
default: $(grep 'poetry>=' pyproject.toml | sed -E "s/.*'(.*)'.*/\1/")
1010

1111
runs:
1212
using: composite
@@ -25,10 +25,20 @@ runs:
2525
with:
2626
python-version: ${{ env.PYTHON_VERSION }}
2727

28-
- name: Install packages
29-
run: pip install ${{ inputs.pip-install }}
28+
- name: Install Poetry
29+
uses: abatilo/actions-poetry@v2
30+
with:
31+
poetry-version: ${{ inputs.poetry-version }}
32+
33+
# - name: Install Poetry with specific version from pyproject.toml
34+
# uses: snok/install-poetry@v1
35+
# with:
36+
# poetry-version-from-pyproject-toml: true
37+
38+
- name: Install dependencies
39+
run: poetry install --no-root
3040
shell: bash
3141

3242
- name: Report what was installed
33-
run: pip freeze
43+
run: poetry show
3444
shell: bash

.pre-commit-config.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,19 @@ repos:
77
- id: check-merge-conflict
88
- id: end-of-file-fixer
99

10-
- repo: local
10+
- repo: https://github.com/astral-sh/ruff-pre-commit
11+
# Ruff version.
12+
rev: v0.9.6
1113
hooks:
14+
# Run the linter.
1215
- id: ruff
1316
name: lint with ruff
1417
language: system
1518
entry: ruff check --force-exclude
1619
types: [python]
1720
require_serial: true
1821

22+
# Run the formatter.
1923
- id: ruff-format
2024
name: format with ruff
2125
language: system

0 commit comments

Comments
 (0)