-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'ref/project-config-ci' into ref/project-config-ci-e2e
- Loading branch information
Showing
61 changed files
with
960 additions
and
621 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,61 @@ | ||
# App Check Debug Tokens | ||
VITE_APPCHECK_DEBUG_TOKEN='your-app-check-debug-token' | ||
# |------------------------------------------------------------------------------------------------------------------- # | ||
# | Environment Configuration | ||
# | | ||
# | This file contains the list of environment variables supported by the application. The variables that are mandatory | ||
# | for the application to run are marked as (required). The variables that are optional are marked as (optional). | ||
# | | ||
# | Important: this file serves a source of truth for the environment variables that the application supports and should | ||
# | be updated when variables are added, removed, or changed. | ||
# |------------------------------------------------------------------------------------------------------------------- # | ||
|
||
# Auth Session Timeout (Optional) | ||
# Control the session timeout limit and countdown duration before a user is signed out due to inactivity. | ||
VITE_AUTH_SESSION_TIMEOUT_IDLE_THRESHOLD=900000# 15 minutes in milliseconds | ||
VITE_AUTH_SESSION_TIMEOUT_COUNTDOWN_DURATION=60000# 1 minute in milliseconds | ||
|
||
# -------------------------------------------------------------------------------------------------------------------- # | ||
# ROAR Firekit Configuration | ||
# -------------------------------------------------------------------------------------------------------------------- # | ||
# Project ID (required) | ||
VITE_FIREBASE_ADMIN_PROJECT_ID= | ||
VITE_FIREBASE_APP_PROJECT_ID= | ||
|
||
# API Key (required) | ||
VITE_FIREBASE_ADMIN_API_KEY= | ||
VITE_FIREBASE_APP_API_KEY= | ||
|
||
# Auth Domain (required) | ||
VITE_FIREBASE_ADMIN_AUTH_DOMAIN= | ||
VITE_FIREBASE_APP_AUTH_DOMAIN= | ||
|
||
# Storage Bucket (required) | ||
VITE_FIREBASE_ADMIN_STORAGE_BUCKET= | ||
VITE_FIREBASE_APP_STORAGE_BUCKET= | ||
|
||
# Cloud Messaging Sender ID (required) | ||
VITE_FIREBASE_ADMIN_MESSAGING_SENDER_ID= | ||
VITE_FIREBASE_APP_MESSAGING_SENDER_ID= | ||
|
||
# App ID (required) | ||
VITE_FIREBASE_ADMIN_APP_ID= | ||
VITE_FIREBASE_APP_APP_ID= | ||
|
||
# App Check (optional) | ||
VITE_FIREKIT_ADMIN_RECAPTCHA_SITE_KEY= | ||
VITE_FIREKIT_APP_RECAPTCHA_SITE_KEY= | ||
VITE_FIREKIT_APPCHECK_DEBUG_TOKEN= | ||
|
||
# Google Analytics Measurement ID (optional) | ||
VITE_ANALYTICS_ADMIN_MEASUREMENT_ID= | ||
|
||
# Firekit Logging Level (optional) | ||
VITE_FIREKIT_VERBOSE_LOGGING_ENABLED=false | ||
|
||
# Firebase Emulator (optional) | ||
VITE_FIREBASE_EMULATOR_ENABLED=false | ||
|
||
|
||
# -------------------------------------------------------------------------------------------------------------------- # | ||
# Application Configuration | ||
# -------------------------------------------------------------------------------------------------------------------- # | ||
|
||
# Auth Session Timeout (optional) | ||
# Control the session timeout limit and countdown duration before a user is signed out due to inactivity. | ||
VITE_AUTH_SESSION_TIMEOUT_IDLE_THRESHOLD="900000" | ||
VITE_AUTH_SESSION_TIMEOUT_COUNTDOWN_DURATION="60000" |
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
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,15 +59,24 @@ runs: | |
cd app && pwd && ls -la | ||
# Deploy application | ||
# Note: When invoking this action with 'pr' as environment, the channelId is set to an empty string to deploy to an | ||
# ephemeral preview environment in Firebase Hosting. | ||
- name: Deploy application | ||
# Note: Due to a bug in the FirebaseExtended/action-hosting-deploy action, it is not possible to use a conditional | ||
# expression on the channelId parameter. As a workaround, we use two separate steps to deploy the application. | ||
- name: Deploy application to ephemeral environment | ||
if: ${{ inputs.firebase-channel == 'preview' }} | ||
uses: FirebaseExtended/[email protected] | ||
id: firebase-deploy | ||
with: | ||
firebaseServiceAccount: '${{ env.GCP_HOSTING_SERVICE_ACCOUNT_KEY }}' | ||
projectId: '${{ inputs.firebase-project-id }}' | ||
channelId: ${{ inputs.firebase-channel == 'preview' && '' || 'live' }} | ||
entryPoint: ./app | ||
|
||
- name: Deploy application | ||
if: ${{ inputs.firebase-channel == 'default' }} | ||
uses: FirebaseExtended/[email protected] | ||
with: | ||
firebaseServiceAccount: '${{ env.GCP_HOSTING_SERVICE_ACCOUNT_KEY }}' | ||
projectId: '${{ inputs.firebase-project-id }}' | ||
channelId: 'live' | ||
entryPoint: ./app | ||
|
||
# Output deployment URL | ||
|
@@ -76,5 +85,5 @@ runs: | |
id: output-deployment-url | ||
shell: bash | ||
run: | | ||
deployment_url=$(echo "${{ steps.firebase-deploy.outputs.urls }}" | jq -r '.[0]') | ||
deployment_url="${{ fromJson(steps.firebase-deploy.outputs.urls)[0] }}" | ||
echo "deployment-url=$deployment_url" >> $GITHUB_OUTPUT |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
name: Run Cypress Participant Tests | ||
|
||
on: | ||
# pull_request: | ||
# types: [opened, reopened, synchronize] | ||
workflow_dispatch: | ||
inputs: | ||
pr_branch: | ||
description: 'Checkout this branch from the LEVANTE repository and execute CI/CD tests on it.' | ||
required: true | ||
|
||
concurrency: | ||
group: cypress-tests-${{ github.ref }}-2 | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
cypress-run: | ||
name: Run Cypress Participant Tests | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 90 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
browser: [chromium, edge] | ||
containers: [1, 2] | ||
env: | ||
NODE_OPTIONS: '--max_old_space_size=8192' | ||
NODE_ENV: 'test' | ||
CLEVER_USERNAME: ${{ secrets.CLEVER_USERNAME }} | ||
CLEVER_PASSWORD: ${{ secrets.CLEVER_PASSWORD }} | ||
CYPRESS_BASE_URL: 'http://localhost:5173' | ||
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} | ||
COMMIT_INFO_MESSAGE: E2E Tests for PR ${{ github.event.number }} "${{ github.event.pull_request.title }}" from commit "${{ github.event.pull_request.head.sha }}" | ||
COMMIT_INFO_SHA: ${{ github.event.pull_request.head.sha }} | ||
PARTNER_ADMIN_USERNAME: ${{ secrets.PARTNER_ADMIN_USERNAME }} | ||
PARTNER_ADMIN_PASSWORD: ${{ secrets.PARTNER_ADMIN_PASSWORD }} | ||
PARTNER_ADMIN_ID: ${{ secrets.PARTNER_ADMIN_ID }} | ||
PARTICIPANT_USERNAME: ${{ secrets.PARTICIPANT_USERNAME}} | ||
PARTICIPANT_PASSWORD: ${{ secrets.PARTICIPANT_PASSWORD }} | ||
PARTICIPANT_EMAIL: ${{ secrets.PARTICIPANT_EMAIL }} | ||
PARTICIPANT_EMAIL_PASSWORD: ${{ secrets.PARTICIPANT_EMAIL_PASSWORD }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
VITE_APPCHECK_DEBUG_TOKEN: ${{ secrets.VITE_APPCHECK_DEBUG_TOKEN }} | ||
steps: | ||
# For workflows triggered by pull requests | ||
- name: Checkout PR code | ||
if: github.event_name == 'pull_request' | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.event.pull_request.head.ref }} | ||
repository: ${{ github.event.pull_request.head.repo.full_name }} | ||
|
||
# For workflows triggered manually, targeting the LEVANTE dashboard repository specifically | ||
- name: Checkout manual trigger code | ||
if: github.event_name == 'workflow_dispatch' | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.event.inputs.pr_branch }} | ||
repository: levante-framework/levante-dashboard | ||
fetch-depth: 0 | ||
|
||
- name: Cypress run | ||
uses: cypress-io/github-action@v6 | ||
with: | ||
browser: ${{ matrix.browser }} | ||
build: npm ci && npm run build | ||
start: npm run dev | ||
wait-on: ${{ env.CYPRESS_BASE_URL }} | ||
wait-on-timeout: 120 | ||
record: true | ||
parallel: true | ||
spec: 'cypress/e2e/participant/default-tests/**/*' | ||
ci-build-id: ${{ github.run_id }}-${{ matrix.browser }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
name: Run Cypress Partner Admin Tests | ||
|
||
on: | ||
# pull_request: | ||
# types: [opened, reopened, synchronize] | ||
workflow_dispatch: | ||
inputs: | ||
pr_branch: | ||
description: 'Checkout this branch from the LEVANTE repository and execute CI/CD tests on it.' | ||
required: true | ||
|
||
concurrency: | ||
group: cypress-tests-${{ github.ref }}-1 | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
cypress-run: | ||
name: Run Cypress Partner Admin Tests | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 90 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
browser: [chromium, edge] | ||
containers: [1, 2] | ||
env: | ||
NODE_OPTIONS: '--max_old_space_size=8192' | ||
NODE_ENV: 'test' | ||
CYPRESS_BASE_URL: 'http://localhost:5173' | ||
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} | ||
COMMIT_INFO_MESSAGE: E2E Tests for PR ${{ github.event.number }} "${{ github.event.pull_request.title }}" from commit "${{ github.event.pull_request.head.sha }}" | ||
COMMIT_INFO_SHA: ${{ github.event.pull_request.head.sha }} | ||
PARTNER_ADMIN_USERNAME: ${{ secrets.PARTNER_ADMIN_USERNAME }} | ||
PARTNER_ADMIN_PASSWORD: ${{ secrets.PARTNER_ADMIN_PASSWORD }} | ||
PARTNER_ADMIN_ID: ${{ secrets.PARTNER_ADMIN_ID }} | ||
PARTICIPANT_USERNAME: ${{ secrets.PARTICIPANT_USERNAME}} | ||
PARTICIPANT_PASSWORD: ${{ secrets.PARTICIPANT_PASSWORD }} | ||
PARTICIPANT_EMAIL: ${{ secrets.PARTICIPANT_EMAIL }} | ||
PARTICIPANT_EMAIL_PASSWORD: ${{ secrets.PARTICIPANT_EMAIL_PASSWORD }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
VITE_APPCHECK_DEBUG_TOKEN: ${{ secrets.VITE_APPCHECK_DEBUG_TOKEN }} | ||
steps: | ||
# For workflows triggered by pull requests | ||
- name: Checkout PR code | ||
if: github.event_name == 'pull_request' | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.event.pull_request.head.ref }} | ||
repository: ${{ github.event.pull_request.head.repo.full_name }} | ||
|
||
# For workflows triggered manually, targeting the LEVANTE dashboard repository specifically | ||
- name: Checkout manual trigger code | ||
if: github.event_name == 'workflow_dispatch' | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.event.inputs.pr_branch }} | ||
repository: levante-framework/levante-dashboard | ||
fetch-depth: 0 | ||
|
||
- name: Cypress run | ||
uses: cypress-io/github-action@v6 | ||
with: | ||
browser: ${{ matrix.browser }} | ||
build: npm ci && npm run build | ||
start: npm run dev | ||
wait-on: ${{ env.CYPRESS_BASE_URL }} | ||
wait-on-timeout: 120 | ||
record: true | ||
parallel: true | ||
spec: 'cypress/e2e/partner-admin/default-tests/**/*' | ||
ci-build-id: ${{ github.run_id }}-${{ matrix.browser }} |
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
Oops, something went wrong.