Skip to content

Bump cookie, @nestjs/platform-express and express in /sources/packages/backend #4126

Bump cookie, @nestjs/platform-express and express in /sources/packages/backend

Bump cookie, @nestjs/platform-express and express in /sources/packages/backend #4126

# This workflow is executed during pull requests triggered by a user or by the GitHub dependabot.
# When created by the dependabot the access to the env variables is restricted, please see
# https://github.com/dependabot/dependabot-core/issues/3253 and
# https://docs.github.com/en/code-security/dependabot/working-with-dependabot/automating-dependabot-with-github-actions
# To allow access to the secrets in both cases, the test users' passwords (or any other secret) are defined at the
# repository level and also at the `dependabot` secrets for now.
name: Repo Checks - Tests
on: [pull_request]
env:
PROJECT_NAME: aest-sims
BUILD_ID: ${{ github.event.number }}
POSTGRES_PASSWORD: bcgov!
BUILD_REF: ${{ github.base_ref }}
POSTGRES_DB: sims
POSTGRES_PORT: 5432
POSTGRES_USER: admin
DB_SCHEMA: sims
REDIS_PORT: 6379
REDIS_PASSWORD: redis
REDIS_STANDALONE_MODE: "true"
QUEUE_PREFIX: "{sims-local}"
CAMUNDA_OAUTH_DISABLED: true
CAMUNDA_SECURE_CONNECTION: false
CAMUNDA_PLATFORM_VERSION: 8.5.0
jobs:
api-e2e-tests:
name: SIMS API E2E Tests
runs-on: ubuntu-latest
env:
API_PORT: 3000
QUEUE_CONSUMERS_PORT: 3001
DISABLE_ORM_CACHE: "true"
IS_FULLTIME_ALLOWED: ${{ vars.IS_FULLTIME_ALLOWED }}
KEYCLOAK_REALM: ${{ vars.KEYCLOAK_REALM }}
KEYCLOAK_AUTH_URL: "https://dev.loginproxy.gov.bc.ca/auth/"
BCeID_WEB_SERVICE_WSDL: "https://gws1.test.bceid.ca/webservices/Client/V10/BCeIDService.asmx?wsdl"
E2E_TEST_STUDENT_USERNAME: student_e2e_test
E2E_TEST_STUDENT_PASSWORD: ${{ secrets.TEST_STUDENT_PASSWORD }}
E2E_TEST_AEST_BUSINESS_ADMINISTRATORS_USER: ministry-user-aest-business-administrators@e2e-tests
E2E_TEST_AEST_OPERATIONS_USER: ministry-user-aest-operations@e2e-tests
E2E_TEST_AEST_OPERATIONS_ADMINISTRATORS_USER: ministry-user-aest-operations-administrators@e2e-tests
E2E_TEST_AEST_MOF_OPERATIONS_USER: ministry-user-mof-operations@e2e-tests
E2E_TEST_AEST_READ_ONLY_USER: ministry-user-read-only@e2e-tests
E2E_TEST_PASSWORD: ${{ secrets.E2E_TEST_PASSWORD }}
steps:
# Checkout the PR branch.
- name: Checkout Target Branch
uses: actions/checkout@v4
# Generate the coverage report for API
- name: Run Tests
working-directory: "./sources/tests/"
run: |
make e2e-tests-api
- name: Tests Coverage
if: ${{ github.actor != 'dependabot[bot]' }}
uses: slavcodev/coverage-monitor-action@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
status_context: "E2E SIMS API Coverage Report"
comment_context: "E2E SIMS API Coverage Report"
coverage_path: "sources/tests/coverage/api/clover.xml"
threshold_alert: 1
threshold_warning: 50
threshold_metric: "lines"
comment_footer: false
workers-e2e-tests:
name: Workflow Workers E2E Tests
runs-on: ubuntu-latest
env:
WORKERS_PORT: 3020
DISABLE_ORM_CACHE: "true"
steps:
# Checkout the PR branch.
- name: Checkout Target Branch
uses: actions/checkout@v4
# Generate the coverage report for Workflow Workers
- name: Run Tests
working-directory: "./sources/tests/"
run: |
make e2e-tests-workers
- name: Tests Coverage
if: ${{ github.actor != 'dependabot[bot]' }}
uses: slavcodev/coverage-monitor-action@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
status_context: "E2E Workflow Workers Coverage Report"
comment_context: "E2E Workflow Workers Coverage Report"
coverage_path: "sources/tests/coverage/workers/clover.xml"
threshold_alert: 1
threshold_warning: 50
threshold_metric: "lines"
comment_footer: false
workflow-e2e-tests:
name: Workflow E2E Tests
runs-on: ubuntu-latest
steps:
# Checkout the PR branch.
- name: Checkout Target Branch
uses: actions/checkout@v4
# Run e2e tests for workflow.
- name: Run Tests
working-directory: "./sources/tests/"
run: |
make e2e-tests-workflow
queue-consumers-e2e-tests:
name: Queue Consumers E2E Tests
runs-on: ubuntu-latest
env:
QUEUE_CONSUMERS_PORT: 3001
DISABLE_ORM_CACHE: "true"
ESDC_REQUEST_FOLDER: MSFT-Request
ESDC_RESPONSE_FOLDER: MSFT-Response
ESDC_ENVIRONMENT_CODE: D
IS_FULLTIME_ALLOWED: ${{ vars.IS_FULLTIME_ALLOWED }}
steps:
# Checkout the PR branch.
- name: Checkout Target Branch
uses: actions/checkout@v4
# Generate the coverage report for Queue Consumers
- name: Run Tests
working-directory: "./sources/tests/"
run: |
make e2e-tests-queue-consumers
- name: Tests Coverage
if: ${{ github.actor != 'dependabot[bot]' }}
uses: slavcodev/coverage-monitor-action@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
status_context: "E2E Queue Consumers Coverage Report"
comment_context: "E2E Queue Consumers Coverage Report"
coverage_path: "sources/tests/coverage/queue-consumers/clover.xml"
threshold_alert: 1
threshold_warning: 50
threshold_metric: "lines"
comment_footer: false
backend-unit-tests:
name: Backend Unit Tests
runs-on: ubuntu-latest
steps:
# Checkout the PR branch.
- name: Checkout Target Branch
uses: actions/checkout@v4
- name: Setup Nodejs
uses: actions/setup-node@v4
with:
node-version: "18.x"
# Run units tests and generate the coverage report.
- name: Run Tests
working-directory: "./sources/tests/"
run: |
make backend-unit-tests
- name: Tests Coverage
if: ${{ github.actor != 'dependabot[bot]' }}
uses: slavcodev/coverage-monitor-action@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
status_context: "Backend Unit Tests Coverage Report"
comment_context: "Backend Unit Tests Coverage Report"
coverage_path: "sources/tests/coverage/unit-tests/clover.xml"
threshold_alert: 1
threshold_warning: 50
threshold_metric: "lines"
comment_footer: false