Skip to content

Commit 9ea73c8

Browse files
committed
Add test workflow
1 parent 164da0e commit 9ea73c8

File tree

2 files changed

+28
-1
lines changed

2 files changed

+28
-1
lines changed

.github/workflows/test.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
test:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v4
13+
14+
- name: Setup Node.js
15+
uses: actions/setup-node@v4
16+
with:
17+
node-version: '20'
18+
cache: 'yarn'
19+
20+
- name: Install dependencies
21+
run: yarn install --frozen-lockfile
22+
23+
- name: Build cx package
24+
run: yarn build
25+
26+
- name: Run tests
27+
run: yarn test

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"start": "cd docs && webpack-dev-server --config webpack.config.js --open",
77
"test": "yarn workspaces foreach -A --include cx --include babel-plugin-transform-cx-jsx --include babel-plugin-transform-cx-imports run test",
88
"docs": "webpack-dev-server --config docs/webpack.config.js --open",
9-
"build": "node packages/cx/build/index.js",
9+
"build": "yarn workspace cx run compile && yarn workspace cx run build",
1010
"build:docs": "webpack --config docs/webpack.config.js",
1111
"build:docs:root": "webpack --config docs/webpack.config.js",
1212
"measure:docs": "webpack-dev-server --config docs/webpack.config.js --open",

0 commit comments

Comments
 (0)