[pre-commit.ci] pre-commit autoupdate #67
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
# Run pytest against an actual FirecREST server, | |
# rather than just a mock server. | |
name: Server | |
on: | |
push: | |
branches: [main] | |
tags: | |
- 'v*' | |
pull_request: | |
paths-ignore: | |
- README.md | |
- CHANGELOG.md | |
- "docs/**" | |
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 |