Skip to content

Commit 6eb113f

Browse files
committed
wip
1 parent 15fa3cb commit 6eb113f

File tree

2 files changed

+36
-6
lines changed

2 files changed

+36
-6
lines changed

.github/workflows/publish.yml

Lines changed: 33 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,44 @@ on:
66
types: [published, edited]
77

88
jobs:
9-
publish:
9+
build:
1010
runs-on: ubuntu-latest
11+
12+
strategy:
13+
matrix:
14+
node-version: [12]
15+
1116
steps:
1217
- uses: actions/checkout@v2
13-
- uses: actions/setup-node@v2
18+
19+
- name: Use Node.js ${{ matrix.node-version }}
20+
uses: actions/setup-node@v2
1421
with:
15-
node-version: '12.x'
22+
node-version: ${{ matrix.node-version }}
1623
registry-url: 'https://registry.npmjs.org'
1724
scope: '@mertasan'
18-
- run: npm install
19-
- run: npm publish
25+
26+
- name: Use cached node_modules
27+
id: cache
28+
uses: actions/cache@v2
29+
with:
30+
path: node_modules
31+
key: nodeModules-${{ hashFiles('**/package-lock.json') }}-${{ matrix.node-version }}
32+
restore-keys: |
33+
nodeModules-
34+
- name: Install dependencies
35+
if: steps.cache.outputs.cache-hit != 'true'
36+
run: npm install
37+
env:
38+
CI: true
39+
40+
- name: Test
41+
run: npm run test
42+
env:
43+
CI: true
44+
45+
- name: Publish
46+
run: npm publish
2047
env:
48+
CI: true
2149
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}

.github/workflows/tests.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717

1818
strategy:
1919
matrix:
20-
node-version: [12.x, 15.x]
20+
node-version: [12, 14, 16]
2121

2222
steps:
2323
- uses: actions/checkout@v2
@@ -35,13 +35,15 @@ jobs:
3535
key: nodeModules-${{ hashFiles('**/package-lock.json') }}-${{ matrix.node-version }}
3636
restore-keys: |
3737
nodeModules-
38+
3839
- name: Install dependencies
3940
if: steps.cache.outputs.cache-hit != 'true'
4041
run: npm install
4142
env:
4243
CI: true
4344

4445
- name: Tests
46+
run: npm run lint
4547
run: npm run test -- --coverage
4648
env:
4749
CI: true

0 commit comments

Comments
 (0)