Skip to content

Commit 646030a

Browse files
committed
Reintroduces
Embeds the docker-compose offered by firecrest-v2 into CI to run with real firecrest server. Open questions: - [ ] Should we keep the mock? Then we need to run it in the CI and maintain it but maybe helpful for finding bugs. Then I would keept the workflow files - [ ] Fix v2 endpoint problems
1 parent d44f5ca commit 646030a

File tree

5 files changed

+22
-104
lines changed

5 files changed

+22
-104
lines changed

.firecrest-demo-config.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"url": "",
3-
"token_uri": "",
4-
"client_id": "",
5-
"client_secret": "",
2+
"url": "http://localhost:8000/",
3+
"token_uri": "http://localhost:8080/auth/realms/kcrealm/protocol/openid-connect/token",
4+
"client_id": "firecrest-test-client",
5+
"client_secret": "wZVHVIEd9dkJDh9hMKc6DTvkqXxnDttk",
66
"compute_resource": "",
77
"temp_directory": "",
88
"small_file_size_mb": 5.0,

.github/workflows/server-tests.yml

Lines changed: 0 additions & 96 deletions
This file was deleted.

.github/workflows/tests.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,23 +39,37 @@ jobs:
3939
steps:
4040
- uses: actions/checkout@v4
4141

42+
- name: Checkout firecrest-v2 Docker resources
43+
uses: actions/checkout@v4
44+
with:
45+
repository: eth-cscs/firecrest-v2
46+
ref: 2.2.6
47+
path: firecrest-v2
48+
49+
- name: Docker compose
50+
run: |
51+
docker compose -f firecrest-v2/docker-compose.yml up -d
52+
4253
- name: Set up Python ${{ matrix.python-version }}
4354
uses: actions/setup-python@v4
4455
with:
4556
python-version: ${{ matrix.python-version }}
4657
cache: 'pip'
58+
4759
- name: Install dependencies
4860
run: |
4961
python -m pip install --upgrade pip
5062
pip install -e .[dev]
63+
5164
- name: Test with pytest
52-
run: pytest -vv --cov=aiida_firecrest --cov-report=xml --cov-report=term
65+
run: |
66+
pytest --ignore=firecrest-v2 --firecrest-config .firecrest-demo-config.json -vv --cov=aiida_firecrest --cov-report=xml --cov-report=term
5367
5468
- name: Upload coverage reports to Codecov
5569
uses: codecov/codecov-action@v4
5670
with:
5771
name: aiida-firecrest-pytests
58-
flags: pytests
72+
flags: pytests --.....
5973
file: ./coverage.xml
6074
fail_ci_if_error: true
6175
token: ${{ secrets.CODECOV_TOKEN }}

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ requires-python = ">=3.9"
2626
dependencies = [
2727
"aiida-core@git+https://github.com/aiidateam/aiida-core.git@954cbdd",
2828
"click",
29-
"pyfirecrest@git+https://github.com/eth-cscs/pyfirecrest.git@6cae414",
29+
"pyfirecrest~=3.1.0",
3030
"pyyaml",
3131
]
3232

tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ def firecrest_config(
495495
firecrest_url=config.url,
496496
authorization=firecrest.ClientCredentialsAuth(
497497
config.client_id,
498-
Path(config.client_secret).read_text().strip(),
498+
config.client_secret,
499499
config.token_uri,
500500
),
501501
)

0 commit comments

Comments
 (0)