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: add happy-dom CI #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/workflows/ci.yml
Expand Up @@ -41,6 +41,33 @@ jobs:
- name: ⬆️ Upload coverage report
uses: codecov/codecov-action@v1

cannary:
runs-on: ubuntu-latest
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v2
- name: 📥 Download deps
uses: bahmutov/npm-install@v1
with:
useLockFile: false
install-command: yarn --silent
env:
HUSKY_SKIP_INSTALL: true

- name: ✍ Lint
run: npm run lint
- name: 🧪 Test
run: npm run test:happy-dom -- --coverage
- name: 🚧 Build test environments
run: npm run setup:env
- name: 🔬 Test with toolbox
run: npm run test:toolbox
- name: 🏗 Build
run: npm run build

- name: ⬆️ Upload coverage report
uses: codecov/codecov-action@v1

release:
needs: validate
runs-on: ubuntu-latest
Expand Down
2 changes: 2 additions & 0 deletions package.json
Expand Up @@ -32,12 +32,14 @@
"setup:env": "node --experimental-import-meta-resolve scripts/setup.js",
"test": "kcd-scripts test",
"test:jest": "kcd-scripts test",
"test:happy-dom": "kcd-scripts test --env=@happy-dom/jest-environment",
"test:toolbox": "NODE_OPTIONS='--experimental-vm-modules --experimental-modules --experimental-import-meta-resolve' node scripts/test.js",
"test:debug": "kcd-scripts --inspect-brk test --runInBand",
"test:update": "npm test -- --updateSnapshot --coverage",
"validate": "kcd-scripts typecheck"
},
"devDependencies": {
"@happy-dom/jest-environment": "^12.6.0",
"@ph.fritsche/scripts-config": "^2.4.0",
"@ph.fritsche/toolbox": "^1.0.0-alpha.1",
"@testing-library/dom": "^8.19.0",
Expand Down