diff --git a/.github/workflows/commit_checks.yaml b/.github/workflows/commit_checks.yaml index ec34d27..180761a 100644 --- a/.github/workflows/commit_checks.yaml +++ b/.github/workflows/commit_checks.yaml @@ -115,21 +115,21 @@ jobs: # More about interpolation: https://docs.docker.com/compose/environment-variables/variable-interpolation/ - name: Setup. run: | - mkdir docker/.venv + mkdir --parent docker/.venv docker_config_path='/home/captura/app/tests/assets/act.yaml' echo "CAPTURA_CONFIG_CLIENT_TEST=$docker_config_path" > .env echo "CAPTURA_CONFIG_CLIENT=$docker_config_path" >> .env + echo "CAPTURA_CONFIG_APP_TEST=$docker_config_path" >> .env echo "CAPTURA_CONFIG_APP=$docker_config_path" >> .env - echo "CAPTURA_CONFIG_APP=$docker_config_path" >> .env - echo "CAPTURA_FLAKEY=FLAKEY=/home/captura/flakey.yaml" >> .env + echo "CAPTURA_FLAKEY=/home/captura/flakey.yaml" >> .env - name: Start Docker Compose Project. run: | docker compose \ --file docker/compose.yaml \ --env-file .env \ - up --detach --quite-pull + up --detach --quiet-pull docker compose \ --file docker/compose.yaml \ @@ -154,21 +154,24 @@ jobs: exec server \ bash -c ' \ source ~/.venv/bin/activate \ - && pip install poetry \ && poetry run simulatus apply' + echo -e "# Dummy Data Report\n\n~~~" >> $GITHUB_STEP_SUMMARY + docker compose \ + --file docker/compose.yaml \ + exec server \ + bash -c ' \ + source ~/.venv/bin/activate \ + && poetry run simulatus --loud reports aggregate' \ + >> $GITHUB_STEP_SUMMARY + echo -e "~~~\n" >> $GITHUB_STEP_SUMMARY + - name: Run Tests. run: | docker compose \ --file docker/compose.yaml \ exec server \ bash -c ' \ - source ~/.bashrc \ + source ~/.venv/bin/activate \ && pip install poetry \ && poetry run pytest --count 1' - - - - - - diff --git a/docker/compose.yaml b/docker/compose.yaml index 068f541..99f72ea 100644 --- a/docker/compose.yaml +++ b/docker/compose.yaml @@ -14,6 +14,7 @@ services: CAPTURA_CONFIG_APP: "${CAPTURA_CONFIG_APP-/home/captura/app/config/app.yaml}" CAPTURA_CONFIG_APP_TEST: "${CAPTURA_CONFIG_APP_TEST-/home/captura/app/config/app.test.yaml}" CAPTURA_FLAKEY: "${CAPTURA_FLAKEY-/home/captura/app/config/flakey.yaml}" + CAPTURA_PLUGINS_USE: "${CAPTURA_PLUGINS_USE-0}" image: acederberg/captura-development:0.1.5 container_name: captura-server ports: diff --git a/tests/assets/act.yaml b/tests/assets/act.yaml index b3265e2..b1e923d 100644 --- a/tests/assets/act.yaml +++ b/tests/assets/act.yaml @@ -5,7 +5,8 @@ app: host_schema: http:// auth0: api: - audience: captura-dev + audience: + - captura-dev app: client_id: fake client_secret: fake diff --git a/tests/config.py b/tests/config.py index cc18a53..7b09507 100644 --- a/tests/config.py +++ b/tests/config.py @@ -68,6 +68,7 @@ class PytestConfig(ConfigSimulatus): env_nested_delimiter="__", extra="allow", ) + tests: PytestSubConfig