Skip to content
This repository has been archived by the owner on Nov 21, 2024. It is now read-only.

Commit

Permalink
gh-actions: simplify actions
Browse files Browse the repository at this point in the history
  • Loading branch information
drjova committed Jul 26, 2024
1 parent ee6e476 commit 239c65c
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 77 deletions.
69 changes: 0 additions & 69 deletions .github/workflows/backoffice-integration-tests.yml

This file was deleted.

55 changes: 49 additions & 6 deletions .github/workflows/test-backoffice.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,52 @@ jobs:

test:
needs: build
strategy:
fail-fast: false
uses: ./.github/workflows/backoffice-integration-tests.yml
with:
ref: ${{ inputs.ref }}
image: "registry.cern.ch/cern-sis/inspire/backoffice@${{ needs.build.outputs.image-id }}"
runs-on: ubuntu-latest
services:
opensearch:
image: registry.cern.ch/cern-sis/inspirehep/opensearch
env:
bootstrap.memory_lock: true
ES_JAVA_OPTS: -Xms1024m -Xmx1024m
discovery.type: single-node
DISABLE_SECURITY_PLUGIN: true
ports:
- 9200:9200
rabbitmq:
image: rabbitmq:3-management
ports:
- 5672:5672
redis:
image: redis:6
ports:
- 6379:6379
db:
image: postgres:14.1
env:
POSTGRES_DB: inspire
POSTGRES_USER: inspire
POSTGRES_PASSWORD: inspire
ports:
- 5432:5432
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ inputs.ref }}

- name: Test
working-directory: ./backoffice
run: >
docker run
--pull always
--network=host
--entrypoint poetry
--env DJANGO_SETTINGS_MODULE=config.settings.test
--env DISABLE_SECURITY_PLUGIN=true
--env POSTGRES_DB=inspire
--env POSTGRES_USER=inspire
--env POSTGRES_PASSWORD=inspire
--env POSTGRES_HOST=127.0.0.1
--env OPENSEARCH_HOST=127.0.0.1:9200
registry.cern.ch/cern-sis/inspire/backoffice@${{ needs.build.outputs.image-id }}
run pytest
4 changes: 2 additions & 2 deletions .github/workflows/test-workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ jobs:
-v "$(pwd)"/requirements-test.txt:/opt/airflow/requirements-test.txt
-v "$(pwd)"/data:/opt/airflow/data
-e AIRFLOW__CORE__EXECUTOR=CeleryExecutor
-e AIRFLOW__DATABASE__SQL_ALCHEMY_CONN=postgresql+psycopg2://airflow:airflow@postgres-airflow/airflow
-e AIRFLOW__CELERY__RESULT_BACKEND=db+postgresql://airflow:airflow@postgres-airflow/airflow
-e AIRFLOW__DATABASE__SQL_ALCHEMY_CONN=postgresql+psycopg2://airflow:airflow@postgres/airflow
-e AIRFLOW__CELERY__RESULT_BACKEND=db+postgresql://airflow:airflow@postgres/airflow
-e AIRFLOW__CELERY__BROKER_URL=redis://:@redis:6379/0
-e AIRFLOW__CORE__FERNET_KEY=""
-e AIRFLOW__CORE__DAGS_ARE_PAUSED_AT_CREATION="true"
Expand Down

0 comments on commit 239c65c

Please sign in to comment.