Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

👷 chore(ci): Run E2E tests on CI #916

Merged
merged 1 commit into from
Oct 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 31 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ on:
pull_request:

jobs:
test:
name: Run tests
test-unit:
name: Run unit tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -31,3 +31,32 @@ jobs:

- name: Run tests
run: pnpm run test

test-e2e:
name: Run E2E tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: pnpm/action-setup@v2
with:
version: 8.7.6

- uses: actions/setup-node@v3
with:
node-version-file: ".nvmrc"
registry-url: https://registry.npmjs.org
cache: pnpm

- name: Install dependencies
run: pnpm install --frozen-lockfile

# For now, we only need Chromium.
- name: Install browsers for Playwright
run: pnpm dlx playwright install chromium

- name: Build project
run: pnpm run build

- name: Run E2E tests (headless)
run: pnpm run test:e2e:headless
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"prepare": "husky install",
"sort-package-json": "sort-package-json 'package.json' '{packages,wallets,examples}/*/package.json'",
"sort-package-json:check": "sort-package-json 'package.json' '{packages,wallets,examples}/*/package.json' --check",
"test": "turbo test"
"test": "turbo test",
"test:e2e:headless": "turbo test:e2e:headless"
},
"lint-staged": {
"package.json": "sort-package-json"
Expand Down
7 changes: 6 additions & 1 deletion turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
"dependsOn": ["^build"],
"outputs": ["dist/**", "types/**"]
},
"test": {}
"test": {
"dependsOn": ["build"]
},
"test:e2e:headless": {
"dependsOn": ["build"]
}
}
}