Skip to content

Commit

Permalink
separated api and e2e tests to run on separate containers
Browse files Browse the repository at this point in the history
  • Loading branch information
aasimsyed committed Apr 20, 2024
1 parent de12029 commit 8f945d2
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ jobs:
strategy:
fail-fast: false
matrix:
containers: [1, 2, 3]
include:
- test-type: 'api'
- test-type: 'e2e'

steps:
- name: Checkout code
Expand All @@ -20,11 +22,15 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '14'
node-version: '21'

- name: Install dependencies
run: npm install

- name: Run tests
run: npx cypress run ${{ matrix.containers }}

- name: Run API tests
if: ${{ matrix.test-type == 'api' }}
run: npx cypress run --spec "cypress/integration/api/**/*"

- name: Run e2e tests
if: ${{ matrix.test-type == 'e2e' }}
run: npx cypress run --spec "cypress/integration/e2e/**/*"

0 comments on commit 8f945d2

Please sign in to comment.