-
Notifications
You must be signed in to change notification settings - Fork 404
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
40 additions
and
23 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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
// Corteza API location | ||
window.CortezaAPI = '//localhost:8888/api' | ||
|
||
window.i18nPseudoModeEnabled = false |
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 |
---|---|---|
|
@@ -100,37 +100,18 @@ jobs: | |
working-directory: corteza/server/pkg/locale | ||
run: make src/en | ||
|
||
# - name: "Set up PostgreSQL database" | ||
# env: | ||
# POSTGRES_USER: corteza | ||
# POSTGRES_PASSWORD: root | ||
# POSTGRES_DB: corteza_cy_test | ||
# run: | | ||
# docker run -d \ | ||
# --name corteza_postgres \ | ||
# -p 5432:5432 \ | ||
# -e POSTGRES_USER=${POSTGRES_USER} \ | ||
# -e POSTGRES_PASSWORD=${POSTGRES_PASSWORD} \ | ||
# -e POSTGRES_DB=${POSTGRES_DB} \ | ||
# --health-cmd="pg_isready -d ${POSTGRES_DB} -U ${POSTGRES_USER}" \ | ||
# --health-interval=10s \ | ||
# --health-timeout=5s \ | ||
# --health-retries=5 \ | ||
# postgres:15 | ||
|
||
- name: Run server and db | ||
working-directory: corteza | ||
run: | | ||
docker-compose up -d backend | ||
docker-compose up -d postgres | ||
- name: Update config file in webapps | ||
- name: Update config file in ${{ matrix.client.name }} webapp | ||
working-directory: corteza | ||
env: | ||
CLIENT_NAME: ${{ matrix.client.name }} | ||
run: | | ||
cp client/web/${CLIENT_NAME}/public/config.example.js client/web/${CLIENT_NAME}/public/config.js | ||
sed -i -e 's/https:\/\/api.cortezaproject.your-domain.tld/\/\/localhost:8888\/api/g' client/web/${CLIENT_NAME}/public/config.js | ||
cp .github/workflows/assets/client/config.js client/web/${CLIENT_NAME}/public/config.js | ||
- name: Build js | ||
working-directory: corteza/lib/js | ||
|
@@ -144,7 +125,7 @@ jobs: | |
yarn install | ||
yarn build | ||
- name: Run "${{ matrix.client.name }}" | ||
- name: Run ${{ matrix.client.name }} | ||
working-directory: corteza | ||
# re-link the packages for each app | ||
env: | ||
|
@@ -178,7 +159,7 @@ jobs: | |
- name: Wait for backend healthcheck | ||
run: timeout 180s sh -c 'until docker ps | grep corteza_backend_1 | grep -q healthy; do echo "Waiting for container to be healthy..."; sleep 1; done' | ||
|
||
- name: Run CY tests for "${{ matrix.client.name }}" | ||
- name: Run CY tests for ${{ matrix.client.name }} | ||
env: | ||
CLIENT_NAME: ${{ matrix.client.name }} | ||
CLIENT_PORT: ${{ matrix.client.port }} | ||
|
@@ -213,3 +194,35 @@ jobs: | |
SCREENSHOTS_GEN_FOLDER: ${{ env.SCREENSHOTS_GEN_FOLDER }} | ||
run: | | ||
printf '%s\n' "cd screenshots/${SCREENSHOTS_GEN_FOLDER}" 'put -r corteza-e2e-cypress/cypress/screenshots/*' | sftp -q -o "StrictHostKeyChecking no" -i ${RELEASE_CRUST_KEY_FILE} ${RELEASE_CRUST_SFTP_URI} | ||
- name: Send message on successful testing results | ||
if: success() | ||
uses: fadenb/[email protected] | ||
env: | ||
E2E_REPORTS_USER: ${{ secrets.E2E_REPORTS_USER }} | ||
E2E_REPORTS_PASS: ${{ secrets.E2E_REPORTS_PASS }} | ||
with: | ||
homeserver: ${{ secrets.MATRIX_HOME_SERVER }} | ||
token: ${{ secrets.MATRIX_ACCESS_TOKEN }} | ||
channel: ${{ secrets.MATRIX_ROOM_ID }} | ||
message: | | ||
✅ E2e tests passed 🙌 🎉 | ||
🔗 https://${{ secrets.E2E_REPORTS_USER }}:${{ secrets.E2E_REPORTS_PASS }}@releases.cortezaproject.org/e2e-reports/ | ||
- name: Send message on failed testing results | ||
if: failure() | ||
uses: fadenb/[email protected] | ||
env: | ||
E2E_REPORTS_USER: ${{ secrets.E2E_REPORTS_USER }} | ||
E2E_REPORTS_PASS: ${{ secrets.E2E_REPORTS_PASS }} | ||
with: | ||
homeserver: ${{ secrets.MATRIX_HOME_SERVER }} | ||
token: ${{ secrets.MATRIX_ACCESS_TOKEN }} | ||
channel: ${{ secrets.MATRIX_ROOM_ID }} | ||
message: | | ||
❌ E2e tests did not pass, screenshots provided | ||
🔗 https://${{ secrets.E2E_REPORTS_USER }}:${{ secrets.E2E_REPORTS_PASS }}@releases.cortezaproject.org/e2e-reports/ | ||
📷 https://${{ secrets.E2E_REPORTS_USER }}:${{ secrets.E2E_REPORTS_PASS }}@releases.cortezaproject.org/e2e-reports/screenshots/${{ env.SCREENSHOTS_GEN_FOLDER }}/ |