Skip to content

[MDS-6263] Adjustments around Assigned status not behaving as aspected #1061

[MDS-6263] Adjustments around Assigned status not behaving as aspected

[MDS-6263] Adjustments around Assigned status not behaving as aspected #1061

name: Minespace WEB - Cypress Tests
on:
workflow_dispatch:
pull_request:
paths:
- services/common/**
- services/minespace-web/**
- services/core-api/**
- services/document-manager/**
jobs:
run-cypress-minespace:
name: run-cypress-minespace
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
name: checkout
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- uses: actions/setup-node@v3
with:
node-version: 20.x
- name: Install oc
uses: redhat-actions/openshift-tools-installer@v1
with:
oc: "4.7"
- name: oc login
run: |
oc login --token=${{ secrets.BUILD_TOKEN }} --server=${{ secrets.CLUSTER_API }}
- name: Set up env variables
run: |
INPUT=yes LOAD_EXTERNAL=yes make env
sed -i "s/NODE_ENV=.*/NODE_ENV=production/g" ./services/minespace-web/.env
- name: Run keycloak
run: |
make keycloak
- name: Install Dependencies
run: |
yarn
- name: Run app
run: |
ARTIFACTORY_TOKEN=${{ secrets.ARTIFACTORY_TOKEN }} EXTRA_SERVICES=minespace make be-minimal
- name: Seed database
run: |
make ENTRIES=10 seeddb
- name: Run cypress tests
run: yarn workspace @mds/minespace-web cypress run
env:
CYPRESS_TEST_USER: minespace-admin
CYPRESS_TEST_PASSWORD: cypress
CYPRESS_MINESPACE_WEB_TEST_URL: http://localhost:3020
CYPRESS_BACKEND: mds-python-backend
CYPRESS_API_URL: http://localhost:5000
CYPRESS_KEYCLOAK_URL: http://localhost:8080/auth
CYPRESS_ENVIRONMENT: local
CYPRESS_DOC_MAN_URL: http://localhost:5001
CYPRESS_MATOMO_URL: https://matomo-4c2ba9-test.apps.silver.devops.gov.bc.ca/
CYPRESS_KEYCLOAK_CLIENT_ID: mines-digital-services-mds-public-client-4414
CYPRESS_KEYCLOAK_RESOURCE: mines-digital-services-mds-public-client-4414
CYPRESS_KEYCLOAK_IDP_HINT: idir
CYPRESS_FILE_SYSTEM_PROVIDER_URL: https://mds-dev.apps.silver.devops.gov.bc.ca/file-api/AmazonS3Provider/
CYPRESS_FLAGSMITH_URL: https://mds-flags-dev.apps.silver.devops.gov.bc.ca/api/v1/
CYPRESS_FLAGSMITH_KEY: 4Eu9eEMDmWVEHKDaKoeWY7
- name: Upload cypress video
uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-recording
path: services/minespace-web/cypress/videos
- name: Collect docker logs on failure
if: failure()
uses: jwalton/gh-docker-logs@v2
with:
dest: "./logs"
- name: Tar logs
if: failure()
run: tar cvzf ./logs.tgz ./logs
- name: Upload logs to GitHub
if: failure()
uses: actions/upload-artifact@v4
with:
name: logs.tgz
path: ./logs.tgz