Skip to content

Commit a66584d

Browse files
committed
Run unit tests in CI
1 parent f1d62bf commit a66584d

File tree

3 files changed

+21
-1
lines changed

3 files changed

+21
-1
lines changed

.github/workflows/unit-tests.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Unit tests
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
unit-tests:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
- uses: actions/setup-node@v2
11+
with:
12+
node-version: 16
13+
cache: npm
14+
cache-dependency-path: '**/package-lock.json'
15+
16+
- run: npm ci
17+
- run: npm run bootstrap
18+
- run: npm run build
19+
- run: npm run test:unit

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"format:check": "prettier . --check",
1515
"nuke": "rm -rf node_modules && npm ci && lerna exec 'rm -rf node_modules' && lerna bootstrap --ci",
1616
"upgrade": "rm -rf node_modules package-lock.json && npm install && lerna exec 'rm -rf node_modules package-lock.json' && lerna bootstrap",
17+
"test:unit": "lerna run test --scope lit-dev-tools-cjs --scope lit-dev-tools-esm",
1718
"test:integration": "lerna run test:integration",
1819
"test:integration:update-golden-screenshots": "lerna run test:integration:update-golden-screenshots",
1920
"test:links:redirects": "lerna run test:links:redirects",

packages/lit-dev-tools-cjs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"scripts": {
99
"build": "npm run build:ts",
1010
"build:ts": "../../node_modules/.bin/tsc",
11-
"test": "npm run build && uvu ./lib \".spec.js$\""
11+
"test": "uvu ./lib \".spec.js$\""
1212
},
1313
"dependencies": {
1414
"@types/jsdom": "^16.2.13",

0 commit comments

Comments
 (0)