Skip to content

Commit 9dd2aaa

Browse files
committed
github integration
1 parent fb960d3 commit 9dd2aaa

File tree

4 files changed

+80
-1
lines changed

4 files changed

+80
-1
lines changed

.github/funding.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
custom: "https://tuftsgiving.org/giving-form.html?id=7&showarea=AR001037&areaid=601&recurring=true"

.github/workflows/deploy.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: deploy
2+
3+
on:
4+
push:
5+
branches: [master]
6+
7+
jobs:
8+
deploy:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v2
13+
with:
14+
submodules: 'true'
15+
16+
- uses: actions/setup-node@v2-beta
17+
with:
18+
node-version: '14'
19+
20+
- name: Install dependencies
21+
run: yarn install
22+
23+
- name: Run tests
24+
run: yarn test --coverage
25+
env:
26+
CI: true
27+
28+
- name: Build
29+
run: yarn build
30+
env:
31+
PUBLIC_URL: /treebank-react
32+
33+
- name: Predeploy
34+
run: yarn predeploy
35+
env:
36+
PUBLIC_URL: /treebank-react
37+
38+
- name: Deploy GitHub
39+
uses: JamesIves/github-pages-deploy-action@releases/v3
40+
with:
41+
GITHUB_TOKEN: ${{ github.token }}
42+
BRANCH: gh-pages
43+
FOLDER: example/build
44+
CLEAN: true

.github/workflows/test.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: test
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
test:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
matrix:
10+
node: ['12', '14', '16', '18']
11+
name: Node ${{ matrix.node }} test
12+
steps:
13+
- uses: actions/checkout@v2
14+
15+
- uses: actions/setup-node@v1
16+
with:
17+
node-version: ${{ matrix.node }}
18+
19+
- name: Install dependencies
20+
run: yarn install
21+
22+
- name: Lint code
23+
run: yarn lint
24+
25+
# Ideally yarn audit would be part of the CI flow
26+
# but currently there is too much noise
27+
# See e.g. https://github.com/facebook/create-react-app/issues/8529
28+
# - name: Audit dependencies
29+
# - run: yarn audit
30+
31+
- name: Run unit tests
32+
run: yarn test --coverage
33+
env:
34+
CI: true

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"start": "microbundle-crl watch --no-compress --format modern,cjs",
2929
"lint": "eslint .",
3030
"test": "cross-env CI=1 react-scripts test --env=jsdom",
31-
"predeploy": "cd example && yarn install && yarn run build",
31+
"predeploy": "cd example && yarn install && yarn build",
3232
"deploy": "gh-pages -d example/build"
3333
},
3434
"dependencies": {

0 commit comments

Comments
 (0)