From 00ebf017a390b2faca1bbeec8a69a052789e58e0 Mon Sep 17 00:00:00 2001 From: Behdad Kardgar Date: Thu, 25 Jun 2026 00:38:55 +0200 Subject: [PATCH] add CI badges to README for improved visibility of build status --- .github/workflows/linter.yml | 110 +++++++++++++++++------------------ README.md | 26 +++++---- 2 files changed, 70 insertions(+), 66 deletions(-) diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index bd463dc..81b6ab3 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -1,60 +1,60 @@ -# --- -# ################################# -# ################################# -# ## Super Linter GitHub Actions ## -# ################################# -# ################################# -# name: Lint Code Base +--- + ################################# + ################################# + ## Super Linter GitHub Actions ## + ################################# + ################################# + name: Lint Code Base -# ############################# -# # Start the job on all push # -# ############################# -# on: -# push: -# branches-ignore: [main] -# # Remove the line above to run when pushing to master + ############################# + # Start the job on all push # + ############################# + on: + push: + branches-ignore: [main] + # Remove the line above to run when pushing to master -# ############### -# # Set the Job # -# ############### -# jobs: -# build: -# # Name the Job -# name: Lint Code Base -# # Set the agent to run on -# runs-on: ubuntu-latest + ############### + # Set the Job # + ############### + jobs: + build: + # Name the Job + name: Lint Code Base + # Set the agent to run on + runs-on: ubuntu-latest -# ############################################ -# # Grant status permission for MULTI_STATUS # -# ############################################ -# permissions: -# contents: read -# packages: read -# statuses: write + ############################################ + # Grant status permission for MULTI_STATUS # + ############################################ + permissions: + contents: read + packages: read + statuses: write -# ################## -# # Load all steps # -# ################## -# steps: -# ########################## -# # Checkout the code base # -# ########################## -# - name: Checkout Code -# uses: actions/checkout@v3 -# with: -# # Full git history is needed to get a proper -# # list of changed files within `super-linter` -# fetch-depth: 0 + ################## + # Load all steps # + ################## + steps: + ########################## + # Checkout the code base # + ########################## + - name: Checkout Code + uses: actions/checkout@v3 + with: + # Full git history is needed to get a proper + # list of changed files within `super-linter` + fetch-depth: 0 -# ################################ -# # Run Linter against code base # -# ################################ -# - name: Lint Code Base -# uses: super-linter/super-linter@v5 -# env: -# VALIDATE_ALL_CODEBASE: false -# DEFAULT_BRANCH: main -# VALIDATE_EDITORCONFIG: true -# LINTER_RULES_PATH: / -# EDITORCONFIG_FILE_NAME: .editorconfig -# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + ################################ + # Run Linter against code base # + ################################ + - name: Lint Code Base + uses: super-linter/super-linter@v5 + env: + VALIDATE_ALL_CODEBASE: false + DEFAULT_BRANCH: main + VALIDATE_EDITORCONFIG: true + LINTER_RULES_PATH: / + EDITORCONFIG_FILE_NAME: .editorconfig + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/README.md b/README.md index a790fc8..a0b698f 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,10 @@ **MIT License © 2026 Behdad Kardgar** +[![CI](https://github.com/behdad088/EshopMicroservices/actions/workflows/ci.yml/badge.svg)](https://github.com/behdad088/EshopMicroservices/actions/workflows/ci.yml) +[![CodeQL](https://github.com/behdad088/EshopMicroservices/actions/workflows/codeql.yml/badge.svg)](https://github.com/behdad088/EshopMicroservices/actions/workflows/codeql.yml) +[![Markdown link check](https://github.com/behdad088/EshopMicroservices/actions/workflows/markdown-link-check.yml/badge.svg)](https://github.com/behdad088/EshopMicroservices/actions/workflows/markdown-link-check.yml) +[![.github/workflows/linter.yml](https://github.com/behdad088/EshopMicroservices/actions/workflows/linter.yml/badge.svg)](https://github.com/behdad088/EshopMicroservices/actions/workflows/linter.yml) --- ## Table of Contents @@ -413,28 +417,28 @@ E2E tests simulate real user interactions with the application to verify that co you can run the E2E tests with the following command: 1. Build the test project - ```bash + ```bash dotnet build src/Services/E2ETests/E2ETests.csproj - ``` + ``` 2. Install Playwright browsers (one-time) - ```bash - pwsh src/Services/E2ETests/bin/Debug/net10.0/playwright.ps1 install chromium - ``` - NOTE: If you don't have PowerShell: brew install powershell + ```bash + pwsh src/Services/E2ETests/bin/Debug/net10.0/playwright.ps1 install chromium + ``` + NOTE: If you don't have PowerShell: brew install powershell 3. Start the stack - ```bash - cd src - docker compose -f docker-compose.yml -f docker-compose.e2e.yml up --build -d + ```bash + cd src + docker compose -f docker-compose.yml -f docker-compose.e2e.yml up --build -d ``` 4. Wait for services to be ready (or just alternatively just wait ~60s) ```bash - bash scripts/wait-for-services.sh + bash scripts/wait-for-services.sh ``` 5. Run the tests ```bash - dotnet test src/Services/E2ETests/E2ETests.csproj + dotnet test src/Services/E2ETests/E2ETests.csproj ``` 6. Tear down when done