Release v1.39.1 #4103
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ⚙️ Build Workflow | |
on: | |
pull_request: | |
branches: | |
- 'main' | |
- 'develop' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
code-ql: | |
name: CodeQL Scan ❇️ | |
runs-on: ubuntu-latest | |
timeout-minutes: 360 | |
permissions: | |
actions: read | |
contents: read | |
security-events: write | |
steps: | |
- name: Checkout GitHub repository 📡 | |
uses: actions/checkout@v4 | |
- name: Initialize CodeQL ⚙️ | |
uses: github/codeql-action/init@v3 | |
with: | |
languages: javascript | |
- name: AutoBuild 🌡️ | |
uses: github/codeql-action/autobuild@v3 | |
- name: Perform CodeQL Analysis ❇️ | |
uses: github/codeql-action/analyze@v3 | |
with: | |
category: "/language:javascript" | |
install: | |
name: Install ⚙️ | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout GitHub repository 📡 | |
uses: actions/checkout@v4 | |
- name: Install pnpm 🏗️ | |
uses: pnpm/action-setup@v4 | |
with: | |
run_install: false | |
- name: Setup NodeJS ✨ | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.nvmrc' | |
cache: 'pnpm' | |
- name: Cache pnpm dependencies 🥡 | |
uses: actions/cache@v4 | |
id: cache-node-modules | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-pnpm-v3-${{ hashFiles('pnpm-lock.yaml') }} | |
- name: Install project dependencies 📦 | |
run: pnpm install | |
if: steps.cache-node-modules.outputs.cache-hit != 'true' | |
docker-dev: | |
name: Test Docker Dev 🐳 | |
runs-on: ubuntu-latest | |
needs: | |
- install | |
steps: | |
- name: Checkout GitHub repository 📡 | |
uses: actions/checkout@v4 | |
- name: Install pnpm 🏗️ | |
uses: pnpm/action-setup@v4 | |
with: | |
run_install: false | |
- name: Setup NodeJS ✨ | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.nvmrc' | |
cache: 'pnpm' | |
- name: Start Docker containers 🐳 | |
run: pnpm run docker:dev:start | |
- name: Curl health check 🌡️ | |
run: ./scripts/check-api-health.sh "http://localhost:8080/health" | |
- name: Stop Docker containers 🐳 | |
run: pnpm run docker:dev:stop | |
build: | |
name: Build ✨ | |
runs-on: ubuntu-latest | |
needs: | |
- install | |
steps: | |
- name: Checkout GitHub repository 📡 | |
uses: actions/checkout@v4 | |
- name: Install pnpm 🏗️ | |
uses: pnpm/action-setup@v4 | |
with: | |
run_install: false | |
- name: Setup NodeJS ✨ | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.nvmrc' | |
cache: 'pnpm' | |
- name: Restore pnpm dependencies from cache 🥡 | |
uses: actions/cache/restore@v4 | |
id: cache-node-modules | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-pnpm-v3-${{ hashFiles('pnpm-lock.yaml') }} | |
- name: Build app and check main file ✨ | |
run: | | |
pnpm run build \ | |
test dist/main.js | |
docker-production: | |
name: Test Docker Production 🐳 | |
runs-on: ubuntu-latest | |
needs: | |
- build | |
steps: | |
- name: Checkout GitHub repository 📡 | |
uses: actions/checkout@v4 | |
- name: Install pnpm 🏗️ | |
uses: pnpm/action-setup@v4 | |
with: | |
run_install: false | |
- name: Setup NodeJS ✨ | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.nvmrc' | |
cache: 'pnpm' | |
- name: Start Docker containers 🐳 | |
run: pnpm run docker:production:start | |
- name: Curl health check 🌡️ | |
run: ./scripts/check-api-health.sh "http://localhost:8082/health" | |
- name: Stop Docker containers 🐳 | |
run: pnpm run docker:production:stop | |
lint: | |
name: Lint 🔍 | |
runs-on: ubuntu-latest | |
needs: | |
- install | |
steps: | |
- name: Checkout GitHub repository 📡 | |
uses: actions/checkout@v4 | |
- name: Install pnpm 🏗️ | |
uses: pnpm/action-setup@v4 | |
with: | |
run_install: false | |
- name: Setup NodeJS ✨ | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.nvmrc' | |
cache: 'pnpm' | |
- name: Restore pnpm dependencies from cache 🥡 | |
uses: actions/cache/restore@v4 | |
id: cache-node-modules | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-pnpm-v3-${{ hashFiles('pnpm-lock.yaml') }} | |
- name: Check and lint code 🔍 | |
run: pnpm run lint | |
- name: Check gherkin files format 🥒 | |
run: pnpm run prettier:gherkin | |
unit-tests: | |
name: Unit Tests 🧪 | |
runs-on: ubuntu-latest | |
needs: | |
- install | |
steps: | |
- name: Checkout GitHub repository 📡 | |
uses: actions/checkout@v4 | |
- name: Install pnpm 🏗️ | |
uses: pnpm/action-setup@v4 | |
with: | |
run_install: false | |
- name: Setup NodeJS ✨ | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.nvmrc' | |
cache: 'pnpm' | |
- name: Restore pnpm dependencies from cache 🥡 | |
uses: actions/cache/restore@v4 | |
id: cache-node-modules | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-pnpm-v3-${{ hashFiles('pnpm-lock.yaml') }} | |
- name: Unit tests 🧪 | |
run: pnpm run test:unit:cov | |
- name: Save unit tests coverage report as artifact 💎 | |
uses: actions/upload-artifact@v4 | |
with: | |
name: unit-tests-coverage-report | |
path: tests/unit/coverage | |
e2e-tests: | |
name: E2E Tests ⚗️ | |
runs-on: ubuntu-latest | |
needs: | |
- install | |
steps: | |
- name: Checkout GitHub repository 📡 | |
uses: actions/checkout@v4 | |
- name: Install pnpm 🏗️ | |
uses: pnpm/action-setup@v4 | |
with: | |
run_install: false | |
- name: Setup NodeJS ✨ | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.nvmrc' | |
cache: 'pnpm' | |
- name: Restore pnpm dependencies from cache 🥡 | |
uses: actions/cache/restore@v4 | |
id: cache-node-modules | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-pnpm-v3-${{ hashFiles('pnpm-lock.yaml') }} | |
- name: Start Docker containers 🐳 | |
run: pnpm run docker:test:start | |
- name: E2E tests ⚗️ | |
run: pnpm run test:e2e:cov | |
- name: Save e2e tests coverage report as artifact 💎 | |
uses: actions/upload-artifact@v4 | |
with: | |
name: e2e-tests-coverage-report | |
path: tests/e2e/coverage | |
- name: Stop Docker containers 🐳 | |
run: pnpm run docker:test:stop | |
all-tests: | |
name: All Tests 🧬 | |
runs-on: ubuntu-latest | |
needs: | |
- install | |
steps: | |
- name: Checkout GitHub repository 📡 | |
uses: actions/checkout@v4 | |
- name: Install pnpm 🏗️ | |
uses: pnpm/action-setup@v4 | |
with: | |
run_install: false | |
- name: Setup NodeJS ✨ | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.nvmrc' | |
cache: 'pnpm' | |
- name: Restore pnpm dependencies from cache 🥡 | |
uses: actions/cache/restore@v4 | |
id: cache-node-modules | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-pnpm-v3-${{ hashFiles('pnpm-lock.yaml') }} | |
- name: Start Docker containers 🐳 | |
run: pnpm run docker:test:start | |
- name: All tests 🧬 | |
run: pnpm run test:cov | |
- name: Save tests coverage in cache 🥡 | |
uses: actions/cache/save@v4 | |
id: cache-tests-coverage | |
with: | |
path: tests/coverage | |
key: ${{ runner.os }}-tests-coverage-v3-${{hashFiles('tests/coverage/lcov.info')}} | |
- name: Save global tests coverage report as artifact 💎 | |
uses: actions/upload-artifact@v4 | |
with: | |
name: global-tests-coverage-report | |
path: tests/coverage | |
- name: Stop Docker containers 🐳 | |
run: pnpm run docker:test:stop | |
mutant-tests: | |
name: Mutant Tests 👽 | |
runs-on: ubuntu-latest | |
env: | |
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }} | |
VERSION: ${{ github.head_ref }} | |
needs: | |
- install | |
steps: | |
- name: Checkout GitHub repository 📡 | |
uses: actions/checkout@v4 | |
- name: Install pnpm 🏗️ | |
uses: pnpm/action-setup@v4 | |
with: | |
run_install: false | |
- name: Setup NodeJS ✨ | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.nvmrc' | |
cache: 'pnpm' | |
- name: Restore pnpm dependencies from cache 🥡 | |
uses: actions/cache/restore@v4 | |
id: cache-node-modules | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-pnpm-v3-${{ hashFiles('pnpm-lock.yaml') }} | |
- name: Start Docker containers 🐳 | |
run: pnpm run docker:test:start | |
- name: Mutant tests 👽 | |
run: pnpm run test:stryker:ci | |
- name: Save stryker report as artifact 💎 | |
uses: actions/upload-artifact@v4 | |
with: | |
name: stryker-html-report | |
path: tests/stryker/coverage/index.html | |
- name: Stop Docker containers 🐳 | |
run: pnpm run docker:test:stop | |
acceptance-tests: | |
name: Acceptance Tests 🥒 | |
runs-on: ubuntu-latest | |
needs: | |
- install | |
steps: | |
- name: Checkout GitHub repository 📡 | |
uses: actions/checkout@v4 | |
- name: Install pnpm 🏗️ | |
uses: pnpm/action-setup@v4 | |
with: | |
run_install: false | |
- name: Setup NodeJS ✨ | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.nvmrc' | |
cache: 'pnpm' | |
- name: Restore pnpm dependencies from cache 🥡 | |
uses: actions/cache/restore@v4 | |
id: cache-node-modules | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-pnpm-v3-${{ hashFiles('pnpm-lock.yaml') }} | |
- name: Start Docker containers 🐳 | |
run: pnpm run docker:test:start | |
- name: Acceptance Tests 🥒 | |
id: acceptance-tests | |
continue-on-error: true | |
run: pnpm run test:cucumber | |
- name: Save cucumber report as artifact 💎 | |
uses: actions/upload-artifact@v4 | |
with: | |
name: cucumber-html-report | |
path: tests/acceptance/reports | |
- name: Stop Docker containers 🐳 | |
run: pnpm run docker:test:stop | |
- name: Exit with error if acceptance tests failed 🚨 | |
if: steps.acceptance-tests.outcome != 'success' | |
run: exit 1; | |
sonarcloud: | |
name: SonarCloud Analysis 🌥️ | |
runs-on: ubuntu-latest | |
needs: | |
- all-tests | |
if: "!startsWith(github.head_ref, 'renovate/')" | |
steps: | |
- name: Checkout GitHub repository 📡 | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Restore tests coverage from cache 🥡 | |
uses: actions/cache/restore@v4 | |
id: cache-tests-coverage | |
with: | |
path: tests/coverage | |
key: ${{ runner.os }}-tests-coverage-v3- | |
restore-keys: | | |
${{ runner.os }}-tests-coverage-v3- | |
- name: SonarCloud Scan 🌥️ | |
uses: SonarSource/sonarcloud-github-action@master | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONARCLOUD_TOKEN }} |