-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🧪 Run CI against actual server (#10)
- Loading branch information
1 parent
ffe9cac
commit 066b139
Showing
6 changed files
with
111 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"url": "http://localhost:8000/", | ||
"token_uri": "http://localhost:8080/auth/realms/kcrealm/protocol/openid-connect/token", | ||
"client_id": "firecrest-sample", | ||
"client_secret": "b391e177-fa50-4987-beaf-e6d33ca93571", | ||
"machine": "cluster", | ||
"scratch_path": "/home/service-account-firecrest-sample" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
# Run pytest against an actual FirecREST server, | ||
# rather than just a mock server. | ||
|
||
name: Server | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
tags: | ||
- 'v*' | ||
pull_request: # TODO delete | ||
|
||
jobs: | ||
|
||
tests: | ||
|
||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: ["ubuntu-latest"] | ||
python-version: ["3.9"] | ||
firecrest-version: ["v1.13.0"] | ||
|
||
services: | ||
rabbitmq: | ||
image: rabbitmq:3.8.14-management | ||
ports: | ||
- 5672:5672 | ||
- 15672:15672 | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: checkout the firecrest repository | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: eth-cscs/firecrest | ||
ref: ${{ matrix.firecrest-version }} | ||
path: .demo-server | ||
|
||
- name: Cache Docker images | ||
uses: jpribyl/[email protected] | ||
continue-on-error: true | ||
with: | ||
key: ${{ runner.os }}-docker-${{ matrix.firecrest-version }} | ||
|
||
# note, for some reason, the certificator image fails to build | ||
# if you build them in order, so here we build everything except that first | ||
# and then it seems to work | ||
- name: Build the FirecREST images | ||
run: | | ||
docker-compose build f7t-base | ||
docker-compose build compute | ||
docker-compose build status | ||
docker-compose build storage | ||
docker-compose build tasks | ||
docker-compose build utilities | ||
docker-compose build reservations | ||
docker-compose build client | ||
docker-compose build cluster | ||
docker-compose build keycloak | ||
docker-compose build kong | ||
docker-compose build minio | ||
docker-compose build taskpersistence | ||
docker-compose build opa | ||
docker-compose build openapi | ||
docker-compose build jaeger | ||
docker-compose build certificator | ||
working-directory: .demo-server/deploy/demo | ||
|
||
- name: Ensure permissions of SSH Keys | ||
run: | | ||
chmod 400 .demo-server/deploy/test-build/environment/keys/ca-key | ||
chmod 400 .demo-server/deploy/test-build/environment/keys/user-key | ||
- name: Start the FirecREST server | ||
run: docker-compose up --detach | ||
working-directory: .demo-server/deploy/demo | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
cache: 'pip' | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -e .[dev] | ||
- name: Test with pytest | ||
run: pytest -vv --cov=aiida_firecrest --firecrest-config .firecrest-demo-config.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -132,4 +132,3 @@ dmypy.json | |
.vscode/ | ||
.demo-server/ | ||
_archive/ | ||
.firecrest-config.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters