Skip to content

10. Continuous Integration & Continuous Delivery

Tetiana Kalinovska edited this page Feb 9, 2026 · 1 revision

Backend CI/CD Pipeline

This document describes the CI/CD pipeline used for the backend part of the project. The pipeline is implemented using GitHub Actions and focuses exclusively on backend validation and release automation.

Purpose

The goal of this pipeline is to:

  • Automatically verify backend changes using tests
  • Ensure backend stability before merging changes
  • Provide a release-ready JAR artifact after merging into the main branch

The frontend is intentionally excluded from this pipeline because it is a static application and does not require build or test steps in CI.

Pipeline Overview

The pipeline is defined in: .github/workflows/backend-ci.yml

It consists of two main jobs:

  1. Test job – validates backend changes
  2. Build & Release job – creates and uploads a backend JAR artifact

Triggers

Push events

The pipeline is triggered on push to the following branches:

  • feature/**
  • develop
  • main

Pull requests

The pipeline is triggered for pull requests targeting:

  • develop
  • main

Test Job

When does it run?

  • On every push to a feature/* branch
  • On every push to develop
  • On pull requests targeting develop

What does it do?

  • Checks out the repository
  • Sets up Java 21 (Temurin)
  • Starts a PostgreSQL service container
  • Runs backend tests using Maven (mvn test)

At the moment, the pipeline runs successfully even if no tests are present. Maven treats zero tests as a valid state. The pipeline is already prepared for upcoming backend tests.

Build & Release Job

When does it run?

  • Only on push to the main branch
    (this includes merges of pull requests into main)

What does it do?

  • Checks out the repository
  • Sets up Java 21
  • Starts a PostgreSQL service container
  • Builds the backend application (mvn test package)
  • Uploads the resulting JAR file as a GitHub Actions artifact

This ensures that every merge into main produces a release-ready backend artifact.

Database in CI

The pipeline uses a real PostgreSQL container during execution. The database is created dynamically and exists only for the duration of the job. This allows realistic backend validation without affecting any persistent environment.

Notes

  • The default Spring Boot context load test was temporarily disabled to avoid false CI failures while the backend setup is still evolving.
  • It can be re-enabled later once the test environment and application context are fully stabilized.

Requirements Fulfilled

This pipeline fulfills the following requirements:

  • Tests are run automatically on each feature branch push**
  • A JAR file is uploaded to GitHub on each main branch merge**

Clone this wiki locally