Skip to content

Commit 8d12178

Browse files
committed
🥭 update build setup
1 parent a1f66cf commit 8d12178

File tree

10 files changed

+655
-497
lines changed

10 files changed

+655
-497
lines changed

.github/workflows/ci.yml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: CI
2+
on:
3+
push:
4+
branches:
5+
- main
6+
- master
7+
tags:
8+
- '!*' # Do not execute on tags
9+
env:
10+
GITHUB_TOKEN: ${{secrets.GH_TOKEN}}
11+
CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}}
12+
FORCE_COLOR: 1
13+
14+
15+
jobs:
16+
test:
17+
strategy:
18+
matrix:
19+
platform: [ubuntu-latest, windows-latest, macOS-latest]
20+
node: [16.x, 18.x]
21+
name: Test with Node ${{matrix.node}} on ${{matrix.platform}}
22+
runs-on: ${{matrix.platform}}
23+
steps:
24+
- uses: actions/checkout@v3
25+
- uses: actions/setup-node@v2
26+
with:
27+
node-version: ${{matrix.node}}
28+
- run: npm ci
29+
- run: npm test
30+
31+
32+
# coverage:
33+
# name: Publish coverage
34+
# needs: [test]
35+
# runs-on: ubuntu-latest
36+
# steps:
37+
# - uses: actions/checkout@v3
38+
# - uses: actions/setup-node@v2
39+
# with:
40+
# node-version: 18.x
41+
# - run: npm ci
42+
# - run: npm test
43+
# - uses: paambaati/codeclimate-action@v3.0.0
44+
# - uses: coverallsapp/github-action@master
45+
# with:
46+
# github-token: ${{secrets.GITHUB_TOKEN}}
47+
48+
49+
docs:
50+
name: Publish docs
51+
needs: [test]
52+
runs-on: ubuntu-latest
53+
steps:
54+
- uses: actions/checkout@v3
55+
- uses: actions/setup-node@v2
56+
with:
57+
node-version: 18.x
58+
- run: git clone https://${GITHUB_TOKEN}@github.com/nodef/deploy "$HOME/deploy"
59+
- run: bash "$HOME/deploy/setup.sh"
60+
- run: npm i -g typescript typedoc
61+
- run: npm ci
62+
- run: npm run publish-docs
63+
64+
65+
packages:
66+
name: Publish packages
67+
needs: [test]
68+
runs-on: ubuntu-latest
69+
steps:
70+
- uses: actions/checkout@v3
71+
- uses: actions/setup-node@v2
72+
with:
73+
node-version: 18.x
74+
- run: git clone https://${GITHUB_TOKEN}@github.com/nodef/deploy "$HOME/deploy"
75+
- run: bash "$HOME/deploy/setup.sh"
76+
- run: npm i -g typescript rollup typedoc browserify terser
77+
- run: npm ci
78+
- run: npm run publish-packages

.github/workflows/deploy.yml

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

.github/workflows/pr.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: PR
2+
on: [pull_request]
3+
env:
4+
FORCE_COLOR: 1
5+
6+
7+
jobs:
8+
test:
9+
strategy:
10+
matrix:
11+
platform: [ubuntu-latest, windows-latest, macOS-latest]
12+
node: [16.x, 18.x]
13+
name: Test with Node ${{ matrix.node }} on ${{ matrix.platform }}
14+
runs-on: ${{ matrix.platform }}
15+
steps:
16+
- uses: actions/checkout@v3
17+
- uses: actions/setup-node@v2
18+
with:
19+
node-version: ${{ matrix.node }}
20+
- run: npm ci
21+
- run: npm test

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Generated files
22
.build/
33
.docs/
4+
coverage/
45
*.d.ts
56
*.map
67
example.js

.npmignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
# Source only
22
.gitmodules
33
.github/
4+
.docs/
45
src/
56
data/
67
wiki/
78
tests/
9+
unused/
10+
test.js
11+
CITATION.cff
812
TODO
913

1014
# Build
1115
.build/
12-
.docs/
16+
coverage/
1317
.travis.yml
1418
.coveralls.yml
1519
tsconfig.json

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ main();
116116

117117
[![](https://img.youtube.com/vi/rJYcZX8na_Q/maxresdefault.jpg)](https://www.youtube.com/watch?v=rJYcZX8na_Q)
118118

119+
119120
[tagStrings]: https://nodef.github.io/extra-javascript-text/modules.html#tagStrings
120121
[untagStrings]: https://nodef.github.io/extra-javascript-text/modules.html#untagStrings
121122
[forEachComment]: https://nodef.github.io/extra-javascript-text/modules.html#forEachComment

0 commit comments

Comments
 (0)