Skip to content

V2.4.1 Improve code quality, add list thumbnail, improve UI, share to others, add generic import, add Playwright tests #99

V2.4.1 Improve code quality, add list thumbnail, improve UI, share to others, add generic import, add Playwright tests

V2.4.1 Improve code quality, add list thumbnail, improve UI, share to others, add generic import, add Playwright tests #99

Workflow file for this run

name: CI
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
# purpose: Continuous Integration pipeline
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
inputs:
run-code-quality:
description: 'Check code quality?'
required: false
type: boolean
default: false
run-image-scan:
description: 'Scan container image?'
required: false
type: boolean
default: false
concurrency:
group: "${{ github.ref }}-ci"
cancel-in-progress: true
permissions:
contents: read
pull-requests: write
jobs:
git-check:
name: Git
uses: ./.github/workflows/reusable-git-check.yml
with:
is-pull-request: ${{ github.event_name == 'pull_request' }}
markup-lint:
name: Markup
uses: devpro/github-workflow-parts/.github/workflows/reusable-markup-lint.yml@58dbfe0e9927f2191796ac616a4bb43126e59d98
code-quality:
name: Code
needs: git-check
if: needs.git-check.outputs.app_changed == 'true' || (github.event_name == 'workflow_dispatch' && inputs.run-code-quality)
uses: devpro/github-workflow-parts/.github/workflows/reusable-dotnet-quality.yml@58dbfe0e9927f2191796ac616a4bb43126e59d98
with:
# TODO: need a safe solution for service account json content
#
# echo "Install Playwright browser (chromium)"
# dotnet build --no-restore --configuration Debug test/BlazorApp.PlaywrightTests
# pwsh test/BlazorApp.PlaywrightTests/bin/Debug/net10.0/playwright.ps1 install chromium
#
# E2E_ENABLED=true
# WebApi__BaseUrl=http://localhost:5057
#
# Firebase__WebAppConfiguration__ApiKey=${{ secrets.FIREBASE_APIKEY }}
# Firebase__WebAppConfiguration__AuthDomain=${{ secrets.FIREBASE_PROJECTID }}.firebaseapp.com
# Firebase__WebAppConfiguration__ProjectId=${{ secrets.FIREBASE_PROJECTID }}
# Firebase__ServiceAccount=${{ secrets.FIREBASE_SERVICEACCOUNT }}
custom-commands: |
./scripts/mongodb-install.sh
echo "Initialize database (indexes, tenants & users)"
echo "TODO (MONGODB_URI="mongodb://localhost:27017/keeptrack_dev" ./scripts/...)"
dotnet-test-args: "--report-xunit-trx --coverage --coverage-output-format cobertura"
extra-vars: |
AllowedOrigins__0=5207
AllowedOrigins__1=7042
Features__IsScalarEnabled=true
Features__IsHttpsRedirectionEnabled=false
Infrastructure__MongoDB__ConnectionString=mongodb://localhost:27017
Infrastructure__MongoDB__DatabaseName=keeptrack_ci
Logging__LogLevel__Keeptrack=Debug
fossa-enabled: true
sonar-enabled: true
sonar-cpd-exclusions: "**/*.g.cs,**/*.generated.cs,**/src/WebApi.Contracts/Dto/*.cs,**/src/Domain/Models/*.cs,**/src/Infrastructure.MongoDb/Entities/*.cs"
sonar-exclusions: "**/samples/**,**/*.png"
sonar-organization: ${{ vars.SONAR_ORG }}
sonar-project-key: ${{ vars.SONAR_PROJECT_KEY }}
sonar-project-name: Keeptrack
workflow-parts-version: 58dbfe0e9927f2191796ac616a4bb43126e59d98
secrets:
fossa-api-key: ${{ secrets.FOSSA_API_KEY }}
sonar-token: ${{ secrets.SONAR_TOKEN }}
additional-vars: |
Authentication__JwtBearer__Authority=https://securetoken.google.com/${{ secrets.FIREBASE_PROJECTID }}
Authentication__JwtBearer__TokenValidation__Issuer=https://securetoken.google.com/${{ secrets.FIREBASE_PROJECTID }}
Authentication__JwtBearer__TokenValidation__Audience=${{ secrets.FIREBASE_PROJECTID }}
Tmdb__ApiKey=${{ secrets.TMDB_APIKEY }}
Rawg__ApiKey=${{ secrets.RAWG_APIKEY }}
Discogs__Token=${{ secrets.DISCOGS_TOKEN }}
GoogleBooks__ApiKey=${{ secrets.GOOGLEBOOKS_APIKEY }}
Omdb__ApiKey=${{ secrets.OMDB_APIKEY }}
Igdb__ClientId=${{ secrets.IGDB_CLIENTID }}
Igdb__ClientSecret=${{ secrets.IGDB_CLIENTSECRET }}
FIREBASE_APIKEY=${{ secrets.FIREBASE_APIKEY }}
FIREBASE_USERNAME=${{ secrets.FIREBASE_TESTUSERNAME }}
FIREBASE_PASSWORD=${{ secrets.FIREBASE_TESTPASSWORD }}
permissions:
contents: read
pull-requests: write
image-scan:
name: "Image ${{ matrix.name }}"
needs: git-check
if: needs.git-check.outputs.app_changed == 'true' || (github.event_name == 'workflow_dispatch' && inputs.run-image-scan)
strategy:
matrix:
include:
- name: "Blazor App"
image-name: "keeptrack-blazorapp"
image-definition: "src/BlazorApp/Dockerfile"
- name: "Web Api"
image-name: "keeptrack-webapi"
image-definition: "src/WebApi/Dockerfile"
uses: devpro/github-workflow-parts/.github/workflows/reusable-container-scan.yml@58dbfe0e9927f2191796ac616a4bb43126e59d98
with:
image-definition: ${{ matrix.image-definition }}
image-name: ${{ matrix.image-name }}
image-path: ${{ vars.CONTAINER_REGISTRY_PATH }}
image-tag: "${{ needs.git-check.outputs.version_major_minor }}.${{ github.run_id }}"
max-high-cves: 1 # temporary (2026-07-19): libxml2-2 │ SUSE-SU-2026:3097-1 │ HIGH │ fixed │ 2.12.10-150700.4.11.1 │ 2.12.10-150700.4.14.1 │ Security update for libxml2
max-medium-cves: 0
workflow-parts-version: 58dbfe0e9927f2191796ac616a4bb43126e59d98