Skip to content

Commit da0f58a

Browse files
feat: Add workflow test (#1)
* Add test workflow * pass with no tests
1 parent 0d6941c commit da0f58a

2 files changed

Lines changed: 36 additions & 1 deletion

File tree

.github/workflows/test.yml

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

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"author": "Dante Calderon<mail@dantecalderon.dev>",
66
"scripts": {
77
"start": "nodemon",
8-
"test": "jest"
8+
"test": "jest --passWithNoTests"
99
},
1010
"devDependencies": {
1111
"@types/jest": "^25.1.4",

0 commit comments

Comments
 (0)