Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
nimya-aot committed May 25, 2024
2 parents ce9c683 + 4e02a7c commit c3a09d1
Showing 1 changed file with 33 additions and 4 deletions.
37 changes: 33 additions & 4 deletions .github/workflows/cypress-ci.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
name: Cypress Tests
on: [push]
on:
workflow_dispatch:
inputs:
pr-number:
description: Pull request number
required: false
type: string

jobs:
cypress-run:
runs-on: ubuntu-22.04
#outputs:
# PR_NUMBER: ${{ steps.vars.outputs.PR_ NUMBER}}
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -18,18 +26,39 @@ jobs:
path: "tests/functional"
key: node-modules-${{ hashFiles('tests/functional/package.json') }}


- name: Set variables
id: vars
env:
PR_NUMBER: ${{ github.event.inputs.pr-number }}

run: |
if [[ "$PR_NUMBER" != '' ]]; then
echo "PR_NUMBER=pr-$PR_NUMBER"
else
echo "PR_NUMBER=app"
fi
- name: cypress install
uses: cypress-io/github-action@v6
with:

working-directory: '${{ github.workspace }}/tests/functional'



env:
CYPRESS_keycloakUsername: ${{secrets.keycloakUsername}}
CYPRESS_keycloakPassword: ${{secrets.keycloakPassword}}
CYPRESS_depEnv: ${{secrets.depEnv}}


CYPRESS_depEnv: ${{ steps.vars.PR_NUMBER }}


- uses: actions/upload-artifact@v4
if: failure()
with:
Expand Down

0 comments on commit c3a09d1

Please sign in to comment.