Skip to content

Commit d2907d3

Browse files
committed
ci: add commitlint check to github actions
1 parent 9d8070b commit d2907d3

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

.github/workflows/main.yml

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
# This is a basic workflow to help you get started with Actions
2-
31
name: CI
42

5-
# Controls when the action will run.
3+
# Controls when the action will run.
64
on:
75
# Trigger the workflow on push or pull request,
86
# but only for the main branch
97
push:
10-
8+
119
pull_request:
1210
branches:
1311
- main
@@ -26,7 +24,11 @@ jobs:
2624
steps:
2725
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
2826
- uses: actions/checkout@v2
29-
27+
with:
28+
fetch-depth: 0
29+
30+
- uses: wagoid/commitlint-github-action@v3
31+
3032
# Install Chrome Browser
3133
- name: Setup Chrome
3234
# You may pin to the exact commit or the version.
@@ -35,14 +37,14 @@ jobs:
3537
with:
3638
# The Chromium version to install and use.
3739
chrome-version: stable
38-
40+
3941
- name: Print chrome version
4042
run: chrome --version
41-
43+
4244
# Install NodeJS
4345
- name: Setup Node.js environment
44-
uses: actions/[email protected]
45-
46+
uses: actions/[email protected]
47+
4648
- name: Cache node modules
4749
uses: actions/cache@v2
4850
env:
@@ -55,7 +57,7 @@ jobs:
5557
${{ runner.os }}-build-${{ env.cache-name }}-
5658
${{ runner.os }}-build-
5759
${{ runner.os }}-
58-
60+
5961
# Runs npm install
6062
- name: Install dependencies
6163
run: npm install
@@ -65,9 +67,9 @@ jobs:
6567

6668
- name: Build lib
6769
run: npm run build:lib
68-
70+
6971
- name: Run tests
7072
run: npm run test -- --watch false --browsers ChromeHeadless
71-
73+
7274
- name: Run e2e tests
7375
run: npm run e2e -- --protractor-config='e2e/protractor.ci.conf.js'

0 commit comments

Comments
 (0)