Skip to content

Openverse is a search engine for openly-licensed media. This monorepo includes all application code.

2.8 KB
Raw Blame

API jobs

The API flow uses the following other jobs.

test-api

Initialises the API using the api/init recipe and runs tests for the API using the api/test recipe. Tests are run inside a Docker container so neither Python nor Node.js needs to be installed.

This job creates a special separate API image that includes the dev dependencies required for running tests. It does not use the api image created in the build-images job.

This job is skipped if the API codebase has not changed. Its counterparts are

This job exports the api_logs artifact.

This job is treated as the proof of functionality for publishing Docker images
for the API and deploying the image to staging.

Since the job also initialises the API, it provides a basic verification of the
ingestion server's core functionality of populating the API database and
Elasticsearch.

django-checks

Runs a matrix of various Django checks for the API using the following just recipes.

Name Recipe
check_django api/dj check
validate_openapi api/dj spectacular --format openapi-json --validate --file openapi.json
check_migrations api/dj makemigrations --check --noinput --merge
test_doc api/doc-test
test_media_props api/generate-docs

This job is skipped if the API codebase has not changed. Its counterpart is nuxt-checks for the frontend.

Since this is a required check for a matrix job, it has a bypass counterpart. Refer to the documentation for bypass jobs.

The job with the name test_doc in this matrix exports the openapi.json artifact.