Continuous integration
Prophecies' GitHub Actions workflow is designed to automate the process of linting, testing, and publishing Docker images. This workflow triggers on every push to the repository and is structured into several jobs to ensure code quality and reliability before a new Docker image is published.
Jobs Overview
The workflow consists of six main jobs.
lint-backend
lint-backendPurpose: Lints the backend code to ensure it adheres to Python coding standards.
Python Version: Runs with Python 3.9.
Command: Uses
pylintto lint thepropheciesdirectory.
test-backend
test-backendPurpose: Executes backend tests to verify the functionality.
Python Version: Tests are run on both Python 3.9 and 3.10.
Command: Runs backend tests using the
make test-backcommand.
test-frontend
test-frontendPurpose: Conducts frontend tests to ensure UI/UX integrity.
Node Version: Tests are conducted on Node.js versions 16.x and 18.x.
Command: Frontend tests are executed using the
make test-frontcommand.
build
buildPurpose: Build artifacts to be publish with the next release.
Conditions: This job runs only if the push event is a tag push starting with 'v', and it depends on the successful completion of the
lint-backend,test-backend, andtest-frontendjobs.Command: Run a python command to extract the OpenAPI schema file and store it.
package-publish
package-publishPurpose: Restore artifacts from the build job to publish them as Github Release.
Conditions: This job runs only if the push event is a tag push starting with 'v', and it depends on the successful completion of the
buildjob.
docker-publish
docker-publishConditions: This job runs only if the push event is a tag push starting with 'v', and it depends on the successful completion of the
buildjob.Step: This job includes checking out the code, setting up QEMU and Docker Buildx, logging into Docker Hub, preparing the tag name based on the git tag, and finally building and pushing the Docker image.
Secrets
To be able to push on the Docker Hub, this workflow must use the following secrets:
DOCKERHUB_USERNAME: The username for Docker Hub authentication.
DOCKERHUB_PASSWORD: The password or access token for Docker Hub authentication.
Last updated