Skip to content

Commit 2901266

Browse files
committed
Add integration github action with yamllint
1 parent e3dbdff commit 2901266

File tree

3 files changed

+118
-8
lines changed

3 files changed

+118
-8
lines changed

.github/workflows/integration.yaml

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Integration
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request: {}
8+
9+
concurrency:
10+
group: integration-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
changed:
15+
runs-on: ubuntu-latest
16+
17+
outputs:
18+
yaml_changed: ${{ steps.filter-yaml.outputs.changed }}
19+
yaml_files: ${{ steps.filter-yaml.outputs.files }}
20+
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v2
24+
with:
25+
fetch-depth: 0
26+
27+
- name: Get Changed Files
28+
id: changed-files
29+
uses: dorny/paths-filter@v2
30+
with:
31+
list-files: json
32+
filters: |
33+
yaml:
34+
- '**/*.yaml'
35+
- '**/*.yml'
36+
37+
- name: Filter changed YAML files to outputs
38+
id: filter-yaml
39+
run: |
40+
echo ::set-output name=changed::${{ steps.changed-files.outputs.yaml }}
41+
echo ::set-output name=files::${{ steps.changed-files.outputs.yaml_files }}
42+
43+
44+
yaml:
45+
needs:
46+
- changed
47+
if: ${{ needs.changed.outputs.yaml_changed != 'false' }}
48+
runs-on: ubuntu-latest
49+
50+
steps:
51+
- name: Checkout
52+
uses: actions/checkout@v2
53+
54+
- name: Lint YAML Files
55+
id: yaml-lint
56+
run: |
57+
yamllint .

.github/workflows/main.yml

+8-8
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ jobs:
99
container: thomasweise/texlive
1010

1111
steps:
12-
- name: Checkout repo
13-
uses: actions/checkout@v2
12+
- name: Checkout repo
13+
uses: actions/checkout@v2
1414

15-
- name: Compile
16-
run: make
15+
- name: Compile
16+
run: make
1717

18-
- uses: actions/upload-artifact@v2
19-
with:
20-
name: examples
21-
path: examples/*.pdf
18+
- uses: actions/upload-artifact@v2
19+
with:
20+
name: examples
21+
path: examples/*.pdf

.yamllint.yaml

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
yaml-files:
2+
- '*.yaml'
3+
- '*.yml'
4+
5+
rules:
6+
braces:
7+
min-spaces-inside: 0
8+
max-spaces-inside: 1
9+
min-spaces-inside-empty: 0
10+
max-spaces-inside-empty: 0
11+
brackets:
12+
min-spaces-inside: 0
13+
max-spaces-inside: 1
14+
min-spaces-inside-empty: 0
15+
max-spaces-inside-empty: 0
16+
colons:
17+
max-spaces-before: 0
18+
max-spaces-after: 1
19+
commas:
20+
max-spaces-before: 0
21+
comments:
22+
level: warning
23+
require-starting-space: true
24+
min-spaces-from-content: 1
25+
comments-indentation: disable
26+
document-end: disable
27+
document-start: disable
28+
empty-lines:
29+
level: warning
30+
max: 2
31+
max-start: 0
32+
max-end: 1
33+
empty-values:
34+
forbid-in-block-mappings: true
35+
forbid-in-flow-mappings: true
36+
hyphens:
37+
max-spaces-after: 1
38+
indentation:
39+
spaces: consistent
40+
indent-sequences: false
41+
key-duplicates: enable
42+
key-ordering: disable
43+
line-length: disable
44+
new-line-at-end-of-file: enable
45+
# Use UNIX new line characters `\n` instead of DOS new line characters `\r\n`
46+
new-lines:
47+
type: unix
48+
octal-values: disable
49+
quoted-strings:
50+
quote-type: any
51+
required: false
52+
trailing-spaces: enable
53+
truthy: disable

0 commit comments

Comments
 (0)