Skip to content

chore(deps-dev): bump testcontainers from 10.28.0 to 12.1.0 #149

chore(deps-dev): bump testcontainers from 10.28.0 to 12.1.0

chore(deps-dev): bump testcontainers from 10.28.0 to 12.1.0 #149

Workflow file for this run

name: CI Workflow
on:
push:
branches:
- "develop/*"
pull_request:
branches:
- "develop/*"
- "version/*"
types:
- opened
- synchronize
jobs:
build:
name: Build (Node ${{ matrix.node-version }})
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [22.x, 24.x, 26.x]
steps:
- name: Checkout repository
uses: actions/checkout@v7
- name: Set up Node.js
uses: actions/setup-node@v7
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: npm install
- name: Lint code
run: npm run lint
- name: Build project
run: npm run build
test-common:
name: Common
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout repository
uses: actions/checkout@v7
- name: Install dependencies
run: npm install
- name: Run Common tests
run: npm run test -- --testPathPatterns=src/test/common --coverage
env:
COVERAGE_PREFIX: common
JEST_COVERAGE_DIRECTORY: coverage/common
- name: Upload coverage artifact
if: always()
uses: actions/upload-artifact@v7
with:
name: coverage-common
path: coverage/common
- name: Upload coverage to Coveralls
uses: coverallsapp/github-action@8d6379e14d29928660c4ba802d8e85393440b329
with:
flag-name: coverage-common
parallel: true
continue-on-error: true
test-sqlite:
name: SQLite
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout repository
uses: actions/checkout@v7
- name: Install dependencies
run: npm install
- name: Run SQLite tests
run: npm run test -- --testPathPatterns=src/test/sqlite --coverage
env:
COVERAGE_PREFIX: sqlite
JEST_COVERAGE_DIRECTORY: coverage/sqlite
- name: Upload coverage artifact
if: always()
uses: actions/upload-artifact@v7
with:
name: coverage-sqlite
path: coverage/sqlite
- name: Upload coverage to Coveralls
uses: coverallsapp/github-action@8d6379e14d29928660c4ba802d8e85393440b329
with:
flag-name: coverage-sqlite
parallel: true
continue-on-error: true
test-postgresql:
name: PostgreSQL ${{ matrix.pg-version }}
runs-on: ubuntu-latest
needs: build
strategy:
matrix:
pg-version: [15, 16, 17, 18]
steps:
- name: Checkout repository
uses: actions/checkout@v7
- name: Install dependencies
run: npm install
- name: Run PostgreSQL tests
run: npm run test -- --testPathPatterns=src/test/postgresql --coverage
env:
POSTGRESQL_IMAGE: postgres:${{ matrix.pg-version }}
COVERAGE_PREFIX: postgresql-${{ matrix.pg-version }}
JEST_COVERAGE_DIRECTORY: coverage/postgresql-${{ matrix.pg-version }}
- name: Upload coverage artifact
if: always()
uses: actions/upload-artifact@v7
with:
name: coverage-postgresql-${{ matrix.pg-version }}
path: coverage/postgresql-${{ matrix.pg-version }}
- name: Upload coverage to Coveralls
uses: coverallsapp/github-action@8d6379e14d29928660c4ba802d8e85393440b329
with:
flag-name: coverage-postgresql-${{ matrix.pg-version }}
parallel: true
continue-on-error: true
test-mysql:
name: MySQL ${{ matrix.mysql-version }}
runs-on: ubuntu-latest
needs: build
strategy:
matrix:
mysql-version: [8.4, 9.7]
steps:
- name: Checkout repository
uses: actions/checkout@v7
- name: Install dependencies
run: npm install
- name: Run MySQL tests
run: npm run test -- --testPathPatterns=src/test/mysql --coverage
env:
MYSQL_IMAGE: mysql:${{ matrix.mysql-version }}
COVERAGE_PREFIX: mysql-${{ matrix.mysql-version }}
JEST_COVERAGE_DIRECTORY: coverage/mysql-${{ matrix.mysql-version }}
- name: Upload coverage artifact
if: always()
uses: actions/upload-artifact@v7
with:
name: coverage-mysql-${{ matrix.mysql-version }}
path: coverage/mysql-${{ matrix.mysql-version }}
- name: Upload coverage to Coveralls
uses: coverallsapp/github-action@8d6379e14d29928660c4ba802d8e85393440b329
with:
flag-name: coverage-mysql-${{ matrix.mysql-version }}
parallel: true
continue-on-error: true
test-mariadb:
name: MariaDB ${{ matrix.mariadb-version }}
runs-on: ubuntu-latest
needs: build
strategy:
matrix:
mariadb-version: [10.11, 11.4, 11.8, 12.3]
fail-fast: false
steps:
- name: Checkout repository
uses: actions/checkout@v7
- name: Install dependencies
run: npm install
- name: Run MariaDB tests
run: npm run test -- --testPathPatterns=src/test/mariadb --coverage
env:
MARIADB_IMAGE: mariadb:${{ matrix.mariadb-version }}
COVERAGE_PREFIX: mariadb-${{ matrix.mariadb-version }}
JEST_COVERAGE_DIRECTORY: coverage/mariadb-${{ matrix.mariadb-version }}
- name: Upload coverage artifact
if: always()
uses: actions/upload-artifact@v7
with:
name: coverage-mariadb-${{ matrix.mariadb-version }}
path: coverage/mariadb-${{ matrix.mariadb-version }}
- name: Upload coverage to Coveralls
uses: coverallsapp/github-action@8d6379e14d29928660c4ba802d8e85393440b329
with:
flag-name: coverage-mariadb-${{ matrix.mariadb-version }}
parallel: true
continue-on-error: true
coverage-finished:
name: Finalize coverage report
needs:
- test-common
- test-sqlite
- test-postgresql
- test-mysql
- test-mariadb
if: ${{ !failure() && !cancelled() }}
runs-on: ubuntu-latest
steps:
- name: Generate carryforward flags
id: flags
run: |
FLAGS="coverage-common"
# SQLite flags
for node in 22.x; do
FLAGS="$FLAGS,coverage-sqlite"
done
# PostgreSQL flags (4 versions)
for pg in 15 16 17 18; do
FLAGS="$FLAGS,coverage-postgresql-${pg}"
done
# MySQL flags (2 versions)
for mysql in 8.4 9.7; do
FLAGS="$FLAGS,coverage-mysql-${mysql}"
done
# MariaDB flags (4 versions)
for mariadb in 10.11 11.4 11.8 12.3; do
FLAGS="$FLAGS,coverage-mariadb-${mariadb}"
done
# Remove leading comma
FLAGS="${FLAGS:1}"
echo "flags=$FLAGS" >> $GITHUB_OUTPUT
- name: Coveralls Finished
id: coveralls
uses: coverallsapp/github-action@8d6379e14d29928660c4ba802d8e85393440b329
with:
parallel-finished: true
carryforward: ${{ steps.flags.outputs.flags }}
continue-on-error: true
- name: Check Coveralls status
id: check-status
if: always()
run: |
if [ "${{ steps.coveralls.outcome }}" == "success" ]; then
echo "✅ Coveralls report submitted successfully"
echo "status=success" >> $GITHUB_OUTPUT
elif [ "${{ steps.coveralls.outcome }}" == "failure" ]; then
echo "⚠️ Coveralls service is temporarily unavailable"
echo "status=neutral" >> $GITHUB_OUTPUT
else
echo "❓ Coveralls status unknown: ${{ steps.coveralls.outcome }}"
echo "status=neutral" >> $GITHUB_OUTPUT
fi
- name: Set neutral status (if needed)
if: steps.check-status.outputs.status == 'neutral'
uses: actions/github-script@v9
with:
script: |
const { context } = require('@actions/github');
const owner = context.repo.owner;
const repo = context.repo.repo;
const sha = context.sha;
await github.rest.checks.create({
owner,
repo,
name: 'Coveralls / Coverage Report',
head_sha: sha,
status: 'completed',
conclusion: 'neutral',
output: {
title: 'Coveralls service temporarily unavailable',
summary: '⚠️ Coveralls is currently experiencing issues. The coverage report will be submitted when the service is available again.\n\nThis check is marked as neutral and does not block the PR.'
}
});
performance-tests:
name: Performance Tests
runs-on: ubuntu-latest
needs: coverage-finished
steps:
- name: Checkout repository
uses: actions/checkout@v7
- name: Install dependencies
run: npm install
- name: Run Performance tests
run: npm run test:stress
analyze:
name: Analyze code with CodeQL
runs-on: ubuntu-latest
needs: coverage-finished
if: ${{ success() && !cancelled() }}
permissions:
actions: read
contents: read
security-events: write
steps:
- name: Checkout repository
uses: actions/checkout@v7
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
languages: typescript
- name: Autobuild
uses: github/codeql-action/autobuild@v4
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4
sonarcloud:
name: Analyze code with SonarQube
runs-on: ubuntu-latest
needs: coverage-finished
if: ${{ success() && !cancelled() }}
steps:
- name: Checkout repository
uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@9426d40962ed5378910ee2e21d5f8c6fcbf2dd96
with:
files: |
**
files_ignore: |
package.json
.npmrc
**/*.md
.github/**
.gitignore
- name: Check if code changes exist
id: check-changes
run: |
if [ "${{ steps.changed-files.outputs.any_changed }}" == "true" ]; then
echo "has_code_changes=true" >> $GITHUB_OUTPUT
echo "📝 Code changes detected in:"
echo "${{ steps.changed-files.outputs.all_changed_files }}"
else
echo "has_code_changes=false" >> $GITHUB_OUTPUT
echo "📦 Only dependency, documentation or CI/CD files changed"
fi
- name: Download coverage from Coveralls
if: steps.check-changes.outputs.has_code_changes == 'true'
run: |
echo "📊 Downloading merged coverage from Coveralls..."
# Use Coveralls API to get the latest merged coverage
# COVERALLS_REPO_TOKEN is required for private repos, but public repos can use the public API
if [ -n "${{ secrets.COVERALLS_REPO_TOKEN }}" ]; then
COVERALLS_URL="https://coveralls.io/repos/github/${GITHUB_REPOSITORY}/coverage?format=lcov"
curl -s -H "Authorization: token ${{ secrets.COVERALLS_REPO_TOKEN }}" \
-o merged-lcov.info \
"$COVERALLS_URL"
else
# Public repo - use public API (may have rate limits)
COVERALLS_URL="https://coveralls.io/repos/github/${GITHUB_REPOSITORY}/coverage?format=lcov"
curl -s -o merged-lcov.info "$COVERALLS_URL"
fi
if [ -s merged-lcov.info ]; then
echo "✅ Coverage downloaded successfully"
else
echo "⚠️ No coverage data available from Coveralls"
echo "Creating empty coverage file"
echo "TN:" > merged-lcov.info
fi
- name: SonarQube Scan
if: steps.check-changes.outputs.has_code_changes == 'true'
uses: SonarSource/sonarqube-scan-action@22918119ff8e1ca75a623e15c8296b6ea4fbe28f
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_EXTRA_ARGS: "-Dsonar.javascript.lcov.reportPaths=merged-lcov.info"