mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-10-03 19:29:44 +08:00
add circleci info
50
CircleCI.md
50
CircleCI.md
@@ -1 +1,49 @@
|
|||||||
x
|
Shellcheck can be run on CircleCI in a variety of ways:
|
||||||
|
|
||||||
|
### Via [CircleCI Orbs](http://circleci.com/orbs)
|
||||||
|
CircleCI provides a `circleci/shellcheck` orb that can be used in any CircleCI workflow:
|
||||||
|
|
||||||
|
https://circleci.com/orbs/registry/orb/circleci/shellcheck
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
version: 2.1
|
||||||
|
|
||||||
|
orbs:
|
||||||
|
shellcheck: circleci/shellcheck@1.0.0
|
||||||
|
|
||||||
|
workflows:
|
||||||
|
shellcheck:
|
||||||
|
jobs:
|
||||||
|
- shellcheck/check
|
||||||
|
```
|
||||||
|
|
||||||
|
### Manually
|
||||||
|
Simply copy and paste the [existing installation instructions](https://github.com/koalaman/shellcheck#installing) into a `run` step in your CircleCI job.
|
||||||
|
|
||||||
|
For example:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
version: 2.1
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
macos:
|
||||||
|
xcode: "9.0"
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- run: brew install shellcheck
|
||||||
|
```
|
||||||
|
|
||||||
|
Or, in a Linux-based image:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
version: 2.1
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
machine: true
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- run: apt-get install shellcheck
|
||||||
|
```
|
||||||
|
|
Reference in New Issue
Block a user