Skip to content

Commit 4d4909b

Browse files
committed
Add workflows
1 parent 5d23d08 commit 4d4909b

File tree

3 files changed

+57
-1
lines changed

3 files changed

+57
-1
lines changed

.github/workflows/build.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Build
2+
3+
on: push
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v1
10+
11+
- name: Get yarn cache directory path
12+
id: yarn-cache-dir-path
13+
run: echo "::set-output name=dir::$(yarn cache dir)"
14+
15+
- name: Cache yarn dependencies
16+
uses: actions/cache@v2
17+
id: yarn-cache
18+
with:
19+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
20+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
21+
restore-keys: |
22+
${{ runner.os }}-yarn-
23+
24+
- name: Install dependencies
25+
run: yarn install
26+
27+
- name: Build
28+
run: yarn build

.github/workflows/lint.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Lint
2+
3+
on: push
4+
5+
jobs:
6+
lint:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v1
10+
11+
- name: Get yarn cache directory path
12+
id: yarn-cache-dir-path
13+
run: echo "::set-output name=dir::$(yarn cache dir)"
14+
15+
- name: Cache yarn dependencies
16+
uses: actions/cache@v2
17+
id: yarn-cache
18+
with:
19+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
20+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
21+
restore-keys: |
22+
${{ runner.os }}-yarn-
23+
24+
- name: Install dependencies
25+
run: yarn install
26+
27+
- name: Lint
28+
run: yarn lint

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
},
5757
"lint-staged": {
5858
"*.{js,ts,tsx}": [
59-
"xo --fix"
59+
"eslint 'src/**/*.ts' --fix"
6060
]
6161
},
6262
"dependencies": {}

0 commit comments

Comments
 (0)