Skip to content

Commit

Permalink
ember exam test partitioning
Browse files Browse the repository at this point in the history
  • Loading branch information
avzz-19 committed Dec 12, 2024
1 parent 909d300 commit c94b916
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 3 deletions.
48 changes: 45 additions & 3 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
types: [opened, reopened]

jobs:
test:
build:
runs-on: [ubuntu-latest]
concurrency:
group: ${{ github.workflow }}-ci-${{ github.ref }}
Expand All @@ -16,5 +16,47 @@ jobs:
- name: Setup Application
uses: ./.github/actions/setup-app

- name: Run tests
run: npm test
- name: Build ember app
run: npm run build

- name: Upload built ember app
uses: actions/upload-artifact@v4
with:
name: dist
path: dist

unitTests:
needs: [build]
steps:
- name: Download built ember app
uses: actions/download-artifact@v4
with:
name: dist
path: dist

- name: Run unit tests
run: npm run test:unit

integrationTests:
needs: [build]
steps:
- name: Download built ember app
uses: actions/download-artifact@v4
with:
name: dist
path: dist

- name: Run integration tests
run: npm run test:integration

acceptanceTests:
needs: [build]
steps:
- name: Download built ember app
uses: actions/download-artifact@v4
with:
name: dist
path: dist

- name: Run acceptance tests
run: npm run test:acceptance
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
"startprod": "cross-env IRENE_API_HOST=https://api.appknox.com ember server",
"test": "concurrently \"npm:lint\" \"npm:test:*\" --names \"lint,test:\"",
"test:ember": "ember exam --split=6 --parallel",
"test:unit": "ember exam --test-type unit --split=3 --parallel",
"test:acceptance": "ember exam --test-type acceptance --split=6 --parallel",
"test:integration": "ember exam --test-type integration --split=6 --parallel",
"cypress:open": "cypress open",
"cypress:run": "cypress run --browser chrome",
"deploy": "ember deploy production --verbose=true --activate=true --show-progress=true",
Expand Down

0 comments on commit c94b916

Please sign in to comment.