Skip to content

Commit e1ad1e0

Browse files
authored
upgrade GitHub actions (#257)
1 parent 9b31bc7 commit e1ad1e0

File tree

3 files changed

+25
-31
lines changed

3 files changed

+25
-31
lines changed

.github/workflows/node.js.yml

Lines changed: 0 additions & 30 deletions
This file was deleted.

.github/workflows/test.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Test
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
- uses: actions/setup-node@v3
15+
with:
16+
node-version: 16
17+
cache: 'yarn'
18+
- run: yarn --frozen-lockfile
19+
- run: |
20+
echo ::add-matcher::.github/eslint.json
21+
yarn run eslint src test --format=compact
22+
- run: yarn test:mocha

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@
2828
"node": ">=14.5.0"
2929
},
3030
"scripts": {
31-
"test": "mkdir -p test/output && mocha -r module-alias/register 'test/**/*-test.js' test/input.js && eslint src test",
31+
"test": "yarn test:mocha && yarn test:lint",
32+
"test:mocha": "mkdir -p test/output && mocha -r module-alias/register 'test/**/*-test.js' test/input.js",
33+
"test:lint": "eslint src test",
3234
"prepublishOnly": "rm -rf dist && rollup -c",
3335
"postpublish": "git push && git push --tags",
3436
"dev": "snowpack dev"

0 commit comments

Comments
 (0)