Skip to content

Commit

Permalink
Enable dynamic aiida-core version input for GitHub Actions
Browse files Browse the repository at this point in the history
This update allows the aiida-core version to be specified at the workflow level and dynamically passed to the integration-tests action.
  • Loading branch information
superstar54 committed Mar 21, 2024
1 parent c70508e commit 0b2c47b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
14 changes: 7 additions & 7 deletions .github/actions/integration-tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ inputs:
description: GitHub Actions Runner image
required: true
type: string
aiidaCoreVersion: # Define aiida-core-version as an input
description: aiida-core version
required: true
type: string

runs:
using: composite

strategy:
matrix:
aiida-core-version: [2.3, 2.4.3] # test on the latest and the oldest supported version

steps:
- name: Set jupyter token env
run: echo "JUPYTER_TOKEN=$(openssl rand -hex 32)" >> $GITHUB_ENV
Expand All @@ -27,7 +27,7 @@ runs:
- name: Run pytest to test image is working
run: pytest tests_integration/test_image.py
env:
TAG: aiida-${{ matrix.aiida-core-version }}
TAG: aiida-${{ inputs.aiidaCoreVersion }}
shell: bash

# The Firefox and its engine geckodrive need do be installed manually to run
Expand All @@ -50,14 +50,14 @@ runs:
if : ${{ inputs.architecture == 'amd64' }}
run: pytest --driver Firefox tests_integration/test_app.py
env:
TAG: aiida-${{ matrix.aiida-core-version }}
TAG: aiida-${{ inputs.aiidaCoreVersion }}
shell: bash

- name: Run pytest for Chrome
if : ${{ inputs.architecture == 'amd64' }}
run: pytest --driver Chrome tests_integration/test_app.py
env:
TAG: aiida-${{ matrix.aiida-core-version }}
TAG: aiida-${{ inputs.aiidaCoreVersion }}
shell: bash

- name: Upload screenshots as artifacts
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/docker-build-test-upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ on:
jobs:
build-test-upload:
runs-on: ${{ inputs.runsOn }}
strategy:
matrix:
aiida-core-version: [2.3, newly-baked]
continue-on-error: true

steps:
Expand Down Expand Up @@ -60,6 +63,7 @@ jobs:
with:
architecture: ${{ inputs.architecture }}
runsOn: ${{ inputs.runsOn }}
aiidaCoreVersion: ${{ matrix.aiida-core-version }}

- name: Save image as a tar for later use 💾
run: |
Expand Down

0 comments on commit 0b2c47b

Please sign in to comment.