Skip to content

Commit

Permalink
👷 chore(ci): Run E2E tests on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
duckception committed Oct 5, 2023
1 parent dc1f73f commit f477698
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 4 deletions.
32 changes: 30 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,31 @@ 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

- name: Install browsers for Playwright
run: pnpm dlx playwright install

- 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"]
}
}
}

0 comments on commit f477698

Please sign in to comment.