Skip to content

Commit

Permalink
feat: merge workflow (#13)
Browse files Browse the repository at this point in the history
* .github/workflows/merge-main.yml -> .github/workflows/merge.yml

* Leave Cypress to main quickstart

* Merge promotions
  • Loading branch information
DerekRoberts authored Sep 23, 2023
1 parent 2f7e033 commit be7a420
Showing 1 changed file with 3 additions and 50 deletions.
53 changes: 3 additions & 50 deletions .github/workflows/merge-main.yml → .github/workflows/merge.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Merge

on:
pull_request:
workflow_run:
workflows: [PR Closed]
types: [completed]
Expand Down Expand Up @@ -112,48 +113,6 @@ jobs:
- name: Run integration tests
run: BASE_URL=${{ matrix.baseUrl }} API_NAME=${{ matrix.name }} node src/main.js

cypress-e2e:
name: Cypress end to end test
needs: [deploys-test]
runs-on: ubuntu-22.04
defaults:
run:
working-directory: frontend
strategy:
matrix:
browser: [chrome, firefox, edge]
steps:
- uses: actions/checkout@v4
name: Checkout
- name: Cache node modules
id: cache-npm
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with: # npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- if: ${{ steps.cache-npm.outputs.cache-hit != 'true' }}
name: List the state of node modules
continue-on-error: true
run: npm list
- uses: cypress-io/github-action@v6
name: Cypress run
with:
config: pageLoadTimeout=10000,baseUrl=https://quickstart-openshift-test-frontend.apps.silver.devops.gov.bc.ca/
working-directory: ./frontend
browser: ${{ matrix.browser }}
- uses: actions/upload-artifact@v3
if: failure()
with:
name: cypress-screenshots
path: ./cypress/screenshots
if-no-files-found: ignore # 'warn' or 'error' are also available, defaults to `warn`

ghcr-cleanup:
name: GHCR Cleanup
runs-on: ubuntu-latest
Expand All @@ -172,7 +131,7 @@ jobs:
deploys-prod:
name: PROD Deploys
environment: prod
needs: [integration-tests, cypress-e2e]
needs: [integration-tests]
permissions:
issues: write
runs-on: ubuntu-22.04
Expand Down Expand Up @@ -237,13 +196,7 @@ jobs:
packages: write
strategy:
matrix:
component:
- backend
- database
- frontend
- backend-py
- backend-java
- backend-go
component: [backend-py, backend-java, backend-go]
steps:
- uses: shrink/actions-docker-registry-tag@v3
with:
Expand Down

0 comments on commit be7a420

Please sign in to comment.