diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 51c19f47..1e3a3bd5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 diff --git a/package.json b/package.json index 8cc83df7..bb42ec53 100644 --- a/package.json +++ b/package.json @@ -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",