From e1213f0d5014512ee908bdad529ee8569014a554 Mon Sep 17 00:00:00 2001 From: pratushny Date: Mon, 5 Oct 2026 13:00:01 +0400 Subject: [PATCH 1/2] chore: validate Docker Compose configurations in GitHub Actions --- .github/workflows/validate-compose.yml | 28 ++++++++++++++++++++++++++ README.md | 12 ++++++++++- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/validate-compose.yml diff --git a/.github/workflows/validate-compose.yml b/.github/workflows/validate-compose.yml new file mode 100644 index 0000000..f7b5d4d --- /dev/null +++ b/.github/workflows/validate-compose.yml @@ -0,0 +1,28 @@ +name: Validate Docker Compose + +on: + push: + pull_request: + workflow_dispatch: + +permissions: + contents: read + +jobs: + validate-compose: + runs-on: ubuntu-24.04 + timeout-minutes: 5 + steps: + - name: Check out repository + uses: actions/checkout@v7 + with: + persist-credentials: false + + - name: Validate Compose configurations + shell: bash + run: | + docker compose version + for config in testops*/docker-compose.yml; do + echo "Validating $config" + docker compose --env-file "${config%/*}/env-example" -f "$config" config --quiet + done diff --git a/README.md b/README.md index 7999238..544be50 100644 --- a/README.md +++ b/README.md @@ -72,6 +72,16 @@ Use this configuration if you are going to manage end users and their authentica | Redis | preferably standalone server | | S3 solution | standalone server | +## Configuration validation + +GitHub Actions validates all `testops*/docker-compose.yml` files on pushes and pull requests using `docker compose config --quiet` and each configuration's `env-example`. This checks YAML syntax and the Compose model without pulling images or starting containers. + +To validate a configuration locally, run from the repository root: + +```sh +docker compose --env-file testops/env-example -f testops/docker-compose.yml config --quiet +``` + ## Upgrade from version 4 to version 5 The only available paths from to upgrade 4 to 5 are @@ -79,4 +89,4 @@ The only available paths from to upgrade 4 to 5 are - 4.25.1 → 5.3.3, then to next available version - 4.26.1 → 5.3.3 then to next available version -Upgrade process is thoroughly described in [TestOps documentation here.](https://docs.qameta.io/allure-testops/migrations/to-5/) \ No newline at end of file +Upgrade process is thoroughly described in [TestOps documentation here.](https://docs.qameta.io/allure-testops/migrations/to-5/) From 1b91c3b0c5a087663fe0cce612a7394d0ad1703f Mon Sep 17 00:00:00 2001 From: pratushny Date: Mon, 5 Oct 2026 13:05:11 +0400 Subject: [PATCH 2/2] chore: run Compose push checks only on main --- .github/workflows/validate-compose.yml | 2 ++ README.md | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/validate-compose.yml b/.github/workflows/validate-compose.yml index f7b5d4d..b1910e2 100644 --- a/.github/workflows/validate-compose.yml +++ b/.github/workflows/validate-compose.yml @@ -2,6 +2,8 @@ name: Validate Docker Compose on: push: + branches: + - main pull_request: workflow_dispatch: diff --git a/README.md b/README.md index 544be50..af014b8 100644 --- a/README.md +++ b/README.md @@ -74,7 +74,7 @@ Use this configuration if you are going to manage end users and their authentica ## Configuration validation -GitHub Actions validates all `testops*/docker-compose.yml` files on pushes and pull requests using `docker compose config --quiet` and each configuration's `env-example`. This checks YAML syntax and the Compose model without pulling images or starting containers. +GitHub Actions validates all `testops*/docker-compose.yml` files on pushes to `main` and pull requests using `docker compose config --quiet` and each configuration's `env-example`. This checks YAML syntax and the Compose model without pulling images or starting containers. To validate a configuration locally, run from the repository root: