Skip to content

Commit

Permalink
Run install tests from lockfile
Browse files Browse the repository at this point in the history
  • Loading branch information
danielhollas committed Jan 6, 2025
1 parent 295fbcf commit 4265081
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
5 changes: 4 additions & 1 deletion .github/actions/install-aiida-core/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ inputs:
description: list of optional dependencies
# NOTE: The default 'pre-commit' extra recursively contains
# other extras needed to run the tests.
# NOTE: When using a lockfile, set to 'all' to use all extras
default: pre-commit
required: false
# NOTE: Hard-learned lesson: we cannot use type=boolean here, apparently :-(
Expand Down Expand Up @@ -39,8 +40,10 @@ runs:
- name: Install dependencies from uv lock
if: ${{ inputs.from-lock == 'true' }}
# NOTE: We're asserting that the lockfile is up to date
run: uv sync --locked ${{ inputs.extras && format('--extra {0}', inputs.extras) || '' }}
run: uv sync --locked ${{ env.EXTRAS }}
shell: bash
env:
EXTRAS: ${{ inputs.extras == 'all' && '--all-extras' }} ${{ inputs.extras && inputs.extras != 'all' && format('--extra {0}', inputs.extras) || '' }}

- name: Install aiida-core
if: ${{ inputs.from-lock != 'true' }}
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/test-install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ on:
schedule:
- cron: 30 02 * * * # nightly build

env:
FORCE_COLOR: 1

# https://docs.github.com/en/actions/using-jobs/using-concurrency
concurrency:
# only cancel in-progress jobs or runs for the current workflow - matches against branch & tags
Expand All @@ -29,10 +32,10 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Set up Python 3.9
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: '3.9'
python-version: '3.11'

- name: Set up uv
uses: astral-sh/setup-uv@v5
Expand Down Expand Up @@ -198,8 +201,8 @@ jobs:
uses: ./.github/actions/install-aiida-core
with:
python-version: ${{ matrix.python-version }}
extras: '[atomic_tools,docs,notebook,rest,tests,tui]'
from-lock: 'false'
extras: all
from-lock: 'true'

- name: Setup AiiDA environment
run: .github/workflows/setup.sh
Expand Down

0 comments on commit 4265081

Please sign in to comment.