Skip to content

Commit c872797

Browse files
committed
Add gh workflows
1 parent 3847046 commit c872797

File tree

2 files changed

+59
-0
lines changed

2 files changed

+59
-0
lines changed

.github/dependabot.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: npm
4+
directory: "/"
5+
schedule:
6+
interval: daily
7+
time: "11:00"
8+
open-pull-requests-limit: 10

.github/workflows/node-ci.yaml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: tests
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
8+
runs-on: ubuntu-latest
9+
10+
strategy:
11+
matrix:
12+
node-version: [12.x]
13+
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: Use Node.js ${{ matrix.node-version }}
17+
uses: actions/setup-node@v2
18+
with:
19+
node-version: ${{ matrix.node-version }}
20+
- name: Get yarn cache directory path
21+
id: yarn-cache-dir-path
22+
run: echo "::set-output name=dir::$(yarn cache dir)"
23+
- name: Yarn cache
24+
uses: actions/cache@v2
25+
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
26+
with:
27+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
28+
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
29+
restore-keys: |
30+
${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
31+
- name: node_modules/ cache
32+
uses: actions/cache@v2
33+
id: node-modules-cache
34+
with:
35+
path: node_modules
36+
key: ${{ runner.os }}-node-modules-${{ hashFiles('yarn.lock') }}
37+
restore-keys: |
38+
${{ runner.os }}-node-modules-${{ hashFiles('yarn.lock') }}
39+
- name: project - install
40+
run: yarn
41+
- name: lint
42+
run: |
43+
yarn lint
44+
45+
- name: build
46+
run: |
47+
yarn build
48+
49+
- name: test
50+
run: |
51+
yarn test

0 commit comments

Comments
 (0)