Skip to content

Instantly share code, notes, and snippets.

@kavicastelo
Created July 13, 2024 21:18
Show Gist options
  • Save kavicastelo/fca54397a5897e9d63f90283c47770df to your computer and use it in GitHub Desktop.
Save kavicastelo/fca54397a5897e9d63f90283c47770df to your computer and use it in GitHub Desktop.
angualr e2e testing workflow with cypress
name: End-to-End Test
on:
push:
branches:
- 'main'
jobs:
e2e-test:
if: contains(github.event.head_commit.message, '[run-all]')
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Create environment directory
run: mkdir -p client/src/environments
- name: Setup environment variables for production
run: echo "${{ secrets.ENV_FILE_PROD_CONTENT }}" > client/src/environments/environment.ts
- name: Run Cypress tests
run: echo "${{ secrets.ENV_FILE_DEV_CONTENT }}" > client/src/environments/environment.development.ts
- name: Run Cypress tests
run: |
npx cypress run --headless | grep -v 'org.freedesktop.UPower'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment