Skip to content

CI: Generate poetry.lock before caching (part 2) #65

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

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft
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
2 changes: 1 addition & 1 deletion .github/actions/setup-poetry-env/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ runs:
id: cached-poetry-dependencies
uses: actions/cache@v4
with:
path: .venv
path: arcade/.venv
key: venv-${{ runner.os }}-${{ inputs.python-version }}-${{ hashFiles('arcade/poetry.lock') }}

- name: Install dependencies
Expand Down
18 changes: 6 additions & 12 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,12 @@ jobs:
path: ~/.cache/pre-commit
key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}

- name: Set up the environment
- name: Set up the Poetry environment
uses: ./.github/actions/setup-poetry-env

- name: Install pre-commit
run: make install

- name: Run checks
run: make check

Expand All @@ -35,20 +38,11 @@ jobs:
- name: Check out
uses: actions/checkout@v4

- name: Set up python
uses: actions/setup-python@v5
- name: Set up the Poetry environment
uses: ./.github/actions/setup-poetry-env
with:
python-version: ${{ matrix.python-version }}

- name: Install Poetry
uses: snok/install-poetry@v1

- name: Load cached venv
uses: actions/cache@v4
with:
path: .tox
key: venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('arcade/poetry.lock') }}

- name: Install tox
run: |
python -m pip install --upgrade pip
Expand Down
1 change: 0 additions & 1 deletion arcade/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,5 @@ python =
passenv = PYTHON_VERSION
allowlist_externals = poetry
commands =
poetry install -v --all-extras
pytest --doctest-modules tests --cov --cov-config=pyproject.toml --cov-report=xml
# mypy
Loading