Skip to content

Commit

Permalink
test: Add release test worflow
Browse files Browse the repository at this point in the history
  • Loading branch information
DaevMithran committed Jul 25, 2024
1 parent b6d6013 commit 7fb3e09
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:
run: npm run test
env:
CI: true
RELEASE: ${{ github.ref_name == 'develop' }}
APPLICATION_BASE_URL: ${{ vars.APPLICATION_BASE_URL }}
COOKIE_SECRET: ${{ secrets.COOKIE_SECRET }}
ENABLE_AUTHENTICATION: ${{ vars.ENABLE_AUTHENTICATION }}
Expand Down
18 changes: 18 additions & 0 deletions playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,24 @@ export default defineConfig({
},
dependencies: ['Setup unauthenticated user'],
},
...(process.env.RELEASE === 'true'
? [
{
name: 'Release Logged In User Tests',
testMatch: /.*\.release.spec.ts/,
use: {
...devices['Desktop Chrome'],
// Use prepared auth state.
storageState: STORAGE_STATE_AUTHENTICATED,
extraHTTPHeaders: {
// Add x-api-key token to all authenticated requests.
'x-api-key': `${process.env.TEST_USER_API_KEY}`,
},
},
dependencies: ['Setup authenticated user'],
},
]
: []),
],

// Timeout for each test in milliseconds
Expand Down
File renamed without changes.

0 comments on commit 7fb3e09

Please sign in to comment.