Skip to content

Commit

Permalink
Allow specifying different AiiDA base image
Browse files Browse the repository at this point in the history
This allows to test the plugin agains multiple versions of AiiDA.
  • Loading branch information
yakutovicha committed Mar 18, 2024
1 parent a2a6d97 commit 7181e12
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ jobs:
test-plugin:

runs-on: ubuntu-latest
strategy:
matrix:
aiida-version:
- '2.4.3'
- '2.5.0'

timeout-minutes: 30

steps:
Expand Down Expand Up @@ -35,6 +41,8 @@ jobs:
tags: aiida_cp2k_test
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new
build-args: |
AIIDA_VERSION=2.4.3
# Temp fix
# https://github.com/docker/build-push-action/issues/252
Expand Down
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
# For further information on the license, see the LICENSE.txt file. #
###############################################################################

ARG AIIDA_VERSION=2.5.0

FROM aiidateam/aiida-core-with-services:2.5.0
FROM aiidateam/aiida-core-with-services:${AIIDA_VERSION}

# To prevent the container to exit prematurely.
ENV KILL_ALL_RPOCESSES_TIMEOUT=50
Expand Down
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,15 @@ Once this is done, you can build the Docker image with the following command:
```bash
docker build -t aiida_cp2k_test .
```
To test against another version of aiida-core, you can specify the build agrument `AIIDA_VERSION`:
```bash
docker build -t aiida_cp2k_test --build-arg AIIDA_VERSION=2.4.3 .
```

Then, you can launch the container:

```bash
DOKERID=`docker run -d aiida_cp2k_test`
DOCKERID=`docker run -d aiida_cp2k_test`
```
This will remeber the container ID in the variable `DOKERID`.
You can then run the tests with the following command:
Expand Down

0 comments on commit 7181e12

Please sign in to comment.