-
Notifications
You must be signed in to change notification settings - Fork 3
53 lines (50 loc) · 2.14 KB
/
CI.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: CI
on: [push, pull_request]
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: bashate
env:
CI: true
COMMIT_SHA: ${{ github.sha }}
run: |
curl -fsSL https://raw.githubusercontent.com/nemchik/ShellSuite/master/shellsuite.sh -o shellsuite-${COMMIT_SHA}.sh && bash shellsuite-${COMMIT_SHA}.sh -p "${PWD}" -v "bashate" -f " -i E006"
- name: shellcheck
env:
CI: true
COMMIT_SHA: ${{ github.sha }}
run: |
curl -fsSL https://raw.githubusercontent.com/nemchik/ShellSuite/master/shellsuite.sh -o shellsuite-${COMMIT_SHA}.sh && bash shellsuite-${GITHUB_SHA}.sh -p "${PWD}" -v "shellcheck" -f " -x"
- name: shfmt
env:
CI: true
COMMIT_SHA: ${{ github.sha }}
run: |
curl -fsSL https://raw.githubusercontent.com/nemchik/ShellSuite/master/shellsuite.sh -o shellsuite-${COMMIT_SHA}.sh && bash shellsuite-${COMMIT_SHA}.sh -p "${PWD}" -v "shfmt" -f " -s -i 4 -ci -sr -d"
- name: yamllint
env:
CI: true
COMMIT_SHA: ${{ github.sha }}
run: |
while IFS= read -r line; do echo "Linting ${line}"; docker run --rm -v ${PWD}:/code pipelinecomponents/yamllint yamllint -d '{extends: default, rules: {document-start: {present: false}, line-length: disable}}' "${line}" || exit 1; done < <(git ls-files '*.yaml' '*.yml')
- name: markdownlint
env:
CI: true
COMMIT_SHA: ${{ github.sha }}
run: |
while IFS= read -r line; do echo "Linting ${line}"; docker run --rm -v ${PWD}:/data mivok/markdownlint --rules ~MD013,~MD033,~MD034 "${line}" || exit 1; done < <(git ls-files '*.md')
run:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-16.04, ubuntu-18.04]
steps:
- uses: actions/checkout@v1
- name: run
env:
CI: true
COMMIT_SHA: ${{ github.sha }}
run: |
while IFS= read -r line; do echo; sudo -E bash ./main.sh -vt "${line}" || exit 1; echo; done < <(git ls-files '.scripts/*.sh' | sed -E 's/^\.scripts\/(\w+)\.sh$/\1/')