Skip to content

build(deps): Bump postgresql from 16.4.3 to 18.5.6 in /deploy/helm #46

build(deps): Bump postgresql from 16.4.3 to 18.5.6 in /deploy/helm

build(deps): Bump postgresql from 16.4.3 to 18.5.6 in /deploy/helm #46

Workflow file for this run

name: CI
on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
DOTNET_NOLOGO: true
jobs:
# ── Build & Unit Tests ───────────────────────────────────────────────────────
build:
name: Build & Unit Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4
with:
dotnet-version: '10.0.x'
- name: Cache NuGet packages
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/Directory.Packages.props') }}
restore-keys: |
${{ runner.os }}-nuget-
- name: Restore
run: dotnet restore
- name: Build
run: dotnet build --no-restore -c Release -p:TreatWarningsAsErrors=true
- name: Unit Tests
run: |
dotnet test tests/UnitTests \
--no-build \
-c Release \
--logger "trx;LogFileName=unit-tests.trx" \
--logger "console;verbosity=normal" \
--collect:"XPlat Code Coverage" \
--results-directory TestResults
- name: Upload test results
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
if: always()
with:
name: unit-test-results
path: TestResults/*.trx
- name: Upload coverage
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: coverage-unit
path: TestResults/**/coverage.cobertura.xml
# ── Integration Tests ────────────────────────────────────────────────────────
integration-tests:
name: Integration Tests
runs-on: ubuntu-latest
needs: build
services:
postgres:
image: postgres:17-alpine
env:
POSTGRES_DB: integration_tests
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 5s
--health-timeout 5s
--health-retries 10
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4
with:
dotnet-version: '10.0.x'
- name: Cache NuGet packages
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/Directory.Packages.props') }}
- name: Restore
run: dotnet restore
- name: Build
run: dotnet build --no-restore -c Release
- name: Integration Tests
run: |
dotnet test tests/IntegrationTests \
--no-build \
-c Release \
--logger "trx;LogFileName=integration-tests.trx" \
--logger "console;verbosity=normal" \
--results-directory TestResults
env:
ConnectionStrings__DefaultConnection: "Host=localhost;Port=5432;Database=integration_tests;Username=postgres;Password=postgres"
- name: Upload test results
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
if: always()
with:
name: integration-test-results
path: TestResults/*.trx
# ── Acceptance Tests ─────────────────────────────────────────────────────────
acceptance-tests:
name: Acceptance Tests
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4
with:
dotnet-version: '10.0.x'
- name: Cache NuGet packages
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/Directory.Packages.props') }}
- name: Restore
run: dotnet restore
- name: Build
run: dotnet build --no-restore -c Release
- name: Acceptance Tests
run: |
dotnet test tests/AcceptanceTests \
--no-build \
-c Release \
--logger "trx;LogFileName=acceptance-tests.trx" \
--logger "console;verbosity=normal" \
--results-directory TestResults
- name: Upload test results
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
if: always()
with:
name: acceptance-test-results
path: TestResults/*.trx
# ── Docker Build (validate image builds) ────────────────────────────────────
docker:
name: Docker Build
runs-on: ubuntu-latest
needs: [build]
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3
- name: Build Docker image
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6
with:
context: .
push: false
tags: service-template:ci
build-args: VERSION=${{ github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=max
# ── Code Coverage Report ─────────────────────────────────────────────────────
coverage:
name: Coverage Report
runs-on: ubuntu-latest
needs: [build, integration-tests]
if: always()
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
with:
pattern: coverage-*
merge-multiple: true
path: coverage
- name: Upload to Codecov
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5
with:
directory: coverage
fail_ci_if_error: false
token: ${{ secrets.CODECOV_TOKEN }}