Skip to content
This repository was archived by the owner on Dec 20, 2023. It is now read-only.

Commit 0e67ebf

Browse files
Leandro SoaresSoaresMG
Leandro Soares
authored andcommitted
chore: add linting to pull request workflow
1 parent e4a72f1 commit 0e67ebf

File tree

1 file changed

+49
-9
lines changed

1 file changed

+49
-9
lines changed

.github/workflows/pull-request.yml

Lines changed: 49 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,60 @@ on:
66
- master
77

88
jobs:
9+
lint:
10+
name: Lint Branch
11+
runs-on: ubuntu-18.04
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v2
15+
- name: Unshallow
16+
run: git fetch --unshallow
17+
- name: Load Modules
18+
id: cache
19+
uses: actions/cache@v2
20+
with:
21+
path: '**/node_modules'
22+
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
23+
- name: Verify Dependencies
24+
run: yarn
25+
if: steps.cache.outputs.cache-hit != 'true'
26+
- name: Lint Code
27+
run: yarn lint
28+
- name: Lint Commit
29+
run: npx commitlint --from=${{github.event.pull_request.base.sha}}
30+
931
test:
1032
name: Test Branch
1133
runs-on: ubuntu-18.04
1234
steps:
1335
- name: Checkout
14-
uses: actions/checkout@v1
15-
- name: Setup Node.js
16-
uses: actions/setup-node@v1
36+
uses: actions/checkout@v2
37+
- name: Load Modules
38+
id: cache
39+
uses: actions/cache@v2
1740
with:
18-
node-version: 12
19-
- name: Install Dependencies
20-
run: yarn install
21-
- name: Build
22-
run: yarn build
41+
path: '**/node_modules'
42+
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
43+
- name: Verify Dependencies
44+
run: yarn
45+
if: steps.cache.outputs.cache-hit != 'true'
2346
- name: Test
2447
run: yarn test
25-
48+
49+
build:
50+
name: Build Branch
51+
runs-on: ubuntu-18.04
52+
steps:
53+
- name: Checkout
54+
uses: actions/checkout@v2
55+
- name: Load Modules
56+
id: cache
57+
uses: actions/cache@v2
58+
with:
59+
path: '**/node_modules'
60+
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
61+
- name: Verify Dependencies
62+
run: yarn
63+
if: steps.cache.outputs.cache-hit != 'true'
64+
- name: Build
65+
run: yarn build

0 commit comments

Comments
 (0)