1
- # Guide: CI Setup
1
+ # Guide: CI Setup
2
2
3
3
Enforce commit conventions with confidence by linting on your CI servers with ` commitlint ` .
4
4
@@ -15,7 +15,7 @@ npm init
15
15
16
16
# Install and configure if needed
17
17
npm install --save-dev @commitlint-{cli,angular}
18
- echo " module.exports = {extends: ['@commitlint/config-angular']};"
18
+ echo " module.exports = {extends: ['@commitlint/config-angular']};" > commitlint.config.js
19
19
```
20
20
21
21
## First test run with Travis
@@ -31,7 +31,7 @@ script:
31
31
- npm test
32
32
` ` `
33
33
34
- Make sure Travis is connected to your git repository.
34
+ Make sure Travis is connected to your git repository.
35
35
Trigger a build by pushing to your repository.
36
36
37
37
` ` ` bash
@@ -53,7 +53,7 @@ We expect this build to fail:
53
53
## Linting relevant commits
54
54
55
55
What we did so far works but is not very useful as it simply lints the last commit in history.
56
- Let's change that by using environment information provided by TravisCI.
56
+ Let's change that by using environment information provided by TravisCI.
57
57
58
58
Every build exposes the commit that triggered the build via ` TRAVIS_COMMIT ` .
59
59
@@ -78,11 +78,11 @@ script:
78
78
- npm test
79
79
` ` `
80
80
81
- Nice. This handles direct commits and PR originating from the same repository. Let's add forks to the mix.
81
+ Nice. This handles direct commits and PR originating from the same repository. Let's add forks to the mix.
82
82
83
83
# # The full scripts
84
84
85
- We'll have to differentiate between forks and same-repo PRs on our own and move the linting to a dedicated script.
85
+ We'll have to differentiate between forks and same-repo PRs on our own and move the linting to a dedicated script.
86
86
87
87
` ` ` yaml
88
88
# .travis.yml
0 commit comments