Skip to content

Commit

Permalink
chore(ci): add ability to skip recording to Cypress Dashboard (#127)
Browse files Browse the repository at this point in the history
  • Loading branch information
prescottprue authored Jul 26, 2020
1 parent 8d633d8 commit dd681d3
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .github/workflows/app-verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ jobs:
id: emulator-settings
env:
GITHUB_REF: ${{ github.ref }}
SKIP_CYPRESS_RECORDING: ${{ secrets.SKIP_CYPRESS_RECORDING }}
run: |
gitBranch=${GITHUB_REF##*/}
gcloudProject=$(cat .firebaserc | jq -r --arg branch "$gitBranch" '.projects[$branch] // .projects.master')
Expand All @@ -169,11 +170,19 @@ jobs:
echo "::set-env name=FIREBASE_DATABASE_EMULATOR_HOST::localhost:$(cat firebase.json | jq .emulators.database.port)"
echo "::set-env name=FIRESTORE_EMULATOR_HOST::localhost:$(cat firebase.json | jq .emulators.firestore.port)"
echo "::set-env name=CYPRESS_BASE_URL::http://localhost:$(cat package.json | jq .config.port)"
# Skip recording of Cypress results if flag is set in secrets
echo "::set-env name=RECORD_CYPRESS_RESULTS::$(if [ -z "$SKIP_CYPRESS_RECORDING" ] ; then echo false; else echo true; fi;)"
echo "Generating Service Account File..."
echo "$(echo $SERVICE_ACCOUNT | jq .)" > $HOME/serviceAccount.json
echo "::set-env name=GOOGLE_APPLICATION_CREDENTIALS::$HOME/serviceAccount.json"
- name: Print CI Env Variables
run: |
echo Available ENV vars:
env | sort
- name: Download Build Artifact
uses: actions/download-artifact@v2
with:
Expand All @@ -189,7 +198,7 @@ jobs:
with:
browser: chrome
parallel: true
record: true
record: ${{ env.RECORD_CYPRESS_RESULTS }}
headless: true
group: 'UI Integration Tests'
tag: emulated
Expand Down

0 comments on commit dd681d3

Please sign in to comment.