File tree Expand file tree Collapse file tree 2 files changed +43
-0
lines changed Expand file tree Collapse file tree 2 files changed +43
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : CI
2
+
3
+ on : [push, pull_request]
4
+
5
+ jobs :
6
+ commitlint :
7
+ runs-on : ubuntu-22.04
8
+ steps :
9
+ - uses : actions/checkout@v3
10
+ with :
11
+ fetch-depth : 0
12
+ - name : Install required dependencies
13
+ run : |
14
+ sudo apt update
15
+ sudo apt install -y sudo
16
+ sudo apt install -y git curl
17
+ curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
18
+ sudo DEBIAN_FRONTEND=noninteractive apt install -y nodejs
19
+ - name : Print versions
20
+ run : |
21
+ git --version
22
+ node --version
23
+ npm --version
24
+ npx commitlint --version
25
+ - name : Install commitlint
26
+ run : |
27
+ npm install conventional-changelog-conventionalcommits
28
+ npm install commitlint@latest
29
+
30
+ - name : Validate current commit (last commit) with commitlint
31
+ if : github.event_name == 'push'
32
+ run : npx commitlint --from HEAD~1 --to HEAD --verbose
33
+
34
+ - name : Validate PR commits with commitlint
35
+ if : github.event_name == 'pull_request'
36
+ run : npx commitlint --from ${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }} --to ${{ github.event.pull_request.head.sha }} --verbose
Original file line number Diff line number Diff line change 32
32
},
33
33
"devDependencies" : {
34
34
"@babel/core" : " ^7.20.0" ,
35
+ "@commitlint/cli" : " ^18.0.0" ,
36
+ "@commitlint/config-conventional" : " ^18.0.0" ,
35
37
"@testing-library/react-native" : " ^12.4.1" ,
36
38
"@types/jest" : " ^29.5.10" ,
37
39
"@types/react" : " ~18.2.14" ,
50
52
"jest" : {
51
53
"preset" : " jest-expo"
52
54
},
55
+ "commitlint" : {
56
+ "extends" : [
57
+ " @commitlint/config-conventional"
58
+ ]
59
+ },
53
60
"license" : " MIT" ,
54
61
"private" : true ,
55
62
"resolutions" : {
You can’t perform that action at this time.
0 commit comments