Skip to content

Commit ac94df2

Browse files
committed
chore: add actions
1 parent 80ca9b0 commit ac94df2

File tree

6 files changed

+213
-148
lines changed

6 files changed

+213
-148
lines changed

.github/lock.yml

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

.github/workflows/codecov.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: codecov
2+
3+
on: [push]
4+
5+
jobs:
6+
setup:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: checkout
10+
uses: actions/checkout@master
11+
12+
- name: cache package-lock.json
13+
uses: actions/cache@v1
14+
with:
15+
path: package-temp-dir
16+
key: lock-${{ github.sha }}
17+
18+
- name: create package-lock.json
19+
run: npm i --package-lock-only
20+
21+
- name: hack for singe file
22+
run: |
23+
if [ ! -d "package-temp-dir" ]; then
24+
mkdir package-temp-dir
25+
fi
26+
cp package-lock.json package-temp-dir
27+
28+
- name: cache node_modules
29+
id: node_modules_cache_id
30+
uses: actions/cache@v1
31+
with:
32+
path: node_modules
33+
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}
34+
35+
- name: install
36+
if: steps.node_modules_cache_id.outputs.cache-hit != 'true'
37+
run: npm ci
38+
39+
node:
40+
runs-on: ubuntu-latest
41+
steps:
42+
- name: checkout
43+
uses: actions/checkout@master
44+
with:
45+
token: ${{ secrets.ACCESS_TOKEN }}
46+
submodules: true
47+
48+
- name: restore cache from package-lock.json
49+
uses: actions/cache@v1
50+
with:
51+
path: package-temp-dir
52+
key: lock-${{ github.sha }}
53+
54+
- name: restore cache from node_modules
55+
uses: actions/cache@v1
56+
with:
57+
path: node_modules
58+
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}
59+
60+
- name: test
61+
run: npm test
62+
env:
63+
COVERAGE: "true"
64+
65+
- name: codecov
66+
run: npm run codecov
67+
with:
68+
token: ${{ secrets.CODECOV_TOKEN }}
69+
70+
needs: setup
71+

.github/workflows/lock-issue.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: 'Lock threads'
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 * * *'
6+
7+
jobs:
8+
lock:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: dessant/lock-threads@v2
12+
with:
13+
github-token: ${{ github.token }}
14+
issue-lock-inactive-days: '365'
15+
issue-lock-labels: 'outdated'
16+
issue-lock-comment: >
17+
This issue has been automatically locked since there
18+
has not been any recent activity after it was closed.
19+
Please open a new issue for related bugs.
20+
pr-lock-comment: >
21+
This pull request has been automatically locked since there
22+
has not been any recent activity after it was closed.
23+
Please open a new issue for related bugs.

.github/workflows/test.yml

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
name: test
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
setup:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: checkout
10+
uses: actions/checkout@master
11+
12+
- name: cache package-lock.json
13+
uses: actions/cache@v1
14+
with:
15+
path: package-temp-dir
16+
key: lock-${{ github.sha }}
17+
18+
- name: create package-lock.json
19+
run: npm i --package-lock-only
20+
21+
- name: hack for singe file
22+
run: |
23+
if [ ! -d "package-temp-dir" ]; then
24+
mkdir package-temp-dir
25+
fi
26+
cp package-lock.json package-temp-dir
27+
28+
- name: cache node_modules
29+
id: node_modules_cache_id
30+
uses: actions/cache@v1
31+
with:
32+
path: node_modules
33+
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}
34+
35+
- name: install
36+
if: steps.node_modules_cache_id.outputs.cache-hit != 'true'
37+
run: npm ci
38+
39+
compile:
40+
runs-on: ubuntu-latest
41+
steps:
42+
- name: checkout
43+
uses: actions/checkout@master
44+
45+
- name: restore cache from package-lock.json
46+
uses: actions/cache@v1
47+
with:
48+
path: package-temp-dir
49+
key: lock-${{ github.sha }}
50+
51+
- name: restore cache from node_modules
52+
uses: actions/cache@v1
53+
with:
54+
path: node_modules
55+
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}
56+
57+
- name: cache lib
58+
uses: actions/cache@v1
59+
with:
60+
path: lib
61+
key: lib-${{ github.sha }}
62+
63+
- name: cache es
64+
uses: actions/cache@v1
65+
with:
66+
path: es
67+
key: es-${{ github.sha }}
68+
69+
- name: compile
70+
run: npm run compile
71+
needs: setup
72+
73+
lint:
74+
runs-on: ubuntu-latest
75+
steps:
76+
- name: checkout
77+
uses: actions/checkout@master
78+
79+
- name: restore cache from package-lock.json
80+
uses: actions/cache@v1
81+
with:
82+
path: package-temp-dir
83+
key: lock-${{ github.sha }}
84+
85+
- name: restore cache from node_modules
86+
uses: actions/cache@v1
87+
with:
88+
path: node_modules
89+
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}
90+
91+
- name: lint
92+
run: npm run lint
93+
needs: setup
94+
95+
node:
96+
runs-on: ubuntu-latest
97+
steps:
98+
- name: checkout
99+
uses: actions/checkout@master
100+
with:
101+
token: ${{ secrets.ACCESS_TOKEN }}
102+
submodules: true
103+
104+
- name: restore cache from package-lock.json
105+
uses: actions/cache@v1
106+
with:
107+
path: package-temp-dir
108+
key: lock-${{ github.sha }}
109+
110+
- name: restore cache from node_modules
111+
uses: actions/cache@v1
112+
with:
113+
path: node_modules
114+
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}
115+
116+
- name: test
117+
run: npm test
118+
needs: setup
119+

.travis.yml

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

netlify.toml

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

0 commit comments

Comments
 (0)