Skip to content

Commit

Permalink
Use local schemas in openapi spec test
Browse files Browse the repository at this point in the history
Starting up the container with the full Amsterdam Schema takes to long,
so we use the outdated/mangled schema for this test.
  • Loading branch information
jasper-jager committed Jan 20, 2025
1 parent e1c530b commit dbf27fc
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/test-openapi-spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,18 @@ jobs:
uses: actions/checkout@v1

- name: Start containers
run: docker compose -f "docker-compose.yml" up -d --build
run: docker compose -f "docker-compose.yml" --profile openapi_spec_test up -d --build
env:
SCHEMA_URL: "http://schemas/datasets/"


- name: Setup tests
run: |
mkdir spectral
# Create spectral config file
echo 'extends: ["spectral:oas", "spectral:asyncapi"]' > ./spectral/.spectral.yaml
# Give dso-api some time to start
sleep 120
sleep 10
docker compose logs web
# Grab openapi yaml for bag dataset
Expand Down
11 changes: 11 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ services:
- "8090:8000"
links:
- database
- schemas
depends_on:
database:
condition: service_healthy
Expand Down Expand Up @@ -72,3 +73,13 @@ services:
- ALLOW_EMPTY_PASSWORD=yes
ports:
- '6379:6379'

schemas:
image: nginx
profiles: [openapi_spec_test]
ports:
- "8080:80"
volumes:
- "./schemas/data/datasets:/usr/share/nginx/html/datasets"
- "./schemas/data/publishers:/usr/share/nginx/html/publishers"
- "./schemas/conf/default.conf:/etc/nginx/conf.d/default.conf"

0 comments on commit dbf27fc

Please sign in to comment.