Prophecies
APIGithubAbout ICIJAsk for help
  • Introduction
  • Ask for help
  • About ICIJ
  • Github
  • 🌐Getting Started
    • Installation with Docker
    • Key concepts
    • Configure Prophecies
  • ⚡User Guide
    • Upload data as an admin
      • Add a project
      • Add users
      • Add a task
      • Manage a task
    • Check data as a checker
      • Sign in or log in
      • Find a task
      • Read notifications
      • Check records
        • Read tutorial
        • Enter a choice
        • Enter a choice for multiple records
        • Change or cancel a choice
        • Leave a note
        • Open record in new tab
        • Duplicate record
        • Lock record
        • See record's history
      • Search records
      • Filter records
      • Sort records
      • Read shortcuts
      • Read tips
      • Read stats
      • Read history
      • Log out
    • FAQ
  • 🤓Developers
    • Installation from the sources
    • Architecture overview
    • Prophecies API
    • Testing the backend
    • Testing the frontend
    • Continuous integration
    • Publishing a new Docker image
Powered by GitBook

Prophecies is an open source project by the International Consortium of Investigative Journalists

On this page
  • Jobs Overview
  • lint-backend
  • test-backend
  • test-frontend
  • build
  • package-publish
  • docker-publish
  • Secrets
Export as PDF
  1. Developers

Continuous integration

PreviousTesting the frontendNextPublishing a new Docker image

Last updated 1 year ago

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

  • Purpose: Lints the backend code to ensure it adheres to Python coding standards.

  • Python Version: Runs with Python 3.9.

  • Command: Uses pylint to lint the prophecies directory.

test-backend

  • Purpose: 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-back command.

test-frontend

  • Purpose: 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-front command.

build

  • Purpose: 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, and test-frontend jobs.

  • Command: Run a python command to extract the OpenAPI schema file and store it.

package-publish

  • Purpose: 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 build job.

docker-publish

  • 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 build job.

  • 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.

Learn more about how to trigger the .

🤓
publication of a new Docker image
Prophecies' GitHub Actions workflow