Skip to content

Commit

Permalink
forgot .env variables in e2e action workflow
Browse files Browse the repository at this point in the history
e2e tests require .env variables stored in github secrets
  • Loading branch information
arnard76 committed Apr 26, 2024
1 parent 644e97e commit f212b2f
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 10 deletions.
29 changes: 19 additions & 10 deletions .github/workflows/end-to-end-tests.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,22 @@
name: End-to-end tests
on: push
jobs:
cypress-run:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cypress run
uses: cypress-io/github-action@v6
with:
build: npm run build
start: npm start
cypress-run:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Create env File
working-directory: ./backend
run: |
touch .env
echo ENV=DEV >> .env
echo PORT=3000 >> .env
echo DEV_MONGO_URI=${{ secrets.MONGO_DEV_URI }}
echo COGNITO_CLIENT_ID=${{ secrets.COGNITO_CLIENT_ID }}
echo COGNITO_USERPOOL_ID=${{ secrets.COGNITO_USERPOOL_ID }}
- name: Cypress run
uses: cypress-io/github-action@v6
with:
build: npm run build
start: npm start
1 change: 1 addition & 0 deletions cypress/e2e/authentication.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ describe("Authentication", () => {
userIsLoggedOut()
loginAttempt()
userIsLoggedOut() // should still be logged out

cy.get("p").contains("username and/or password incorrect.")
})
})
Expand Down

0 comments on commit f212b2f

Please sign in to comment.