Skip to content

Commit 03a91e0

Browse files
authored
Merge pull request #10 from trfore/v1.1.2-dev
ci: add format and lint jobs to workflows
2 parents 1dc2c36 + 2d259a7 commit 03a91e0

File tree

3 files changed

+57
-10
lines changed

3 files changed

+57
-10
lines changed

.github/workflows/ci.yml

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
11
name: CI
2-
3-
concurrency:
4-
group: ${{ github.head_ref || github.run_id }}
5-
cancel-in-progress: true
6-
72
on:
83
pull_request:
94
branches:
@@ -14,11 +9,29 @@ on:
149
- "step.version"
1510
workflow_dispatch:
1611

12+
concurrency:
13+
group: ${{ github.head_ref || github.run_id }}
14+
cancel-in-progress: true
15+
1716
jobs:
17+
format:
18+
uses: trfore/ansible-role/.github/workflows/format.yml@main
19+
20+
lint:
21+
needs:
22+
- format
23+
uses: trfore/ansible-role/.github/workflows/lint_ansible.yml@main
24+
1825
sanity:
26+
needs:
27+
- format
28+
- lint
1929
uses: ansible/ansible-content-actions/.github/workflows/sanity.yaml@main
30+
2031
test:
2132
needs:
33+
- format
34+
- lint
2235
- sanity
2336
strategy:
2437
fail-fast: false
@@ -33,15 +46,20 @@ jobs:
3346
molecule_glob: "./extensions/molecule/*/molecule.yml"
3447
molecule_scenario: ${{ matrix.molecule_scenario }}
3548
requirements_file: "requirements/dev-requirements.txt"
49+
3650
check:
3751
if: ${{ always() && (github.event_name != 'schedule') }}
3852
needs:
53+
- format
54+
- lint
3955
- sanity
4056
- test
4157
runs-on: ubuntu-latest
4258
steps:
4359
- run: >-
4460
python -c "assert set([
61+
'${{ needs.format.result }}',
62+
'${{ needs.lint.result }}',
4563
'${{ needs.sanity.result }}',
4664
'${{ needs.test.result }}',
4765
]) == {'success'}"

.github/workflows/lint.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Lint
2+
on:
3+
pull_request:
4+
branches: ["main"]
5+
paths:
6+
- "**.md"
7+
- "LICENSE"
8+
push:
9+
branches: ["*"]
10+
paths:
11+
- "**.md"
12+
- "LICENSE"
13+
14+
concurrency:
15+
group: ${{ github.workflow}}-${{ github.event.pull_request.number || github.ref }}
16+
cancel-in-progress: true
17+
18+
jobs:
19+
format:
20+
uses: trfore/ansible-role/.github/workflows/format.yml@main
21+
22+
check:
23+
needs:
24+
- format
25+
runs-on: ubuntu-latest
26+
steps:
27+
- run: >-
28+
python -c "assert set([
29+
'${{ needs.format.result }}',
30+
]) == {'success'}"

.github/workflows/release-check.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
name: Release Check
2-
3-
concurrency:
4-
group: ${{ github.head_ref || github.run_id }}
5-
cancel-in-progress: true
6-
72
on:
83
pull_request:
94
paths:
105
- "step.version"
116

7+
concurrency:
8+
group: ${{ github.head_ref || github.run_id }}
9+
cancel-in-progress: true
10+
1211
jobs:
1312
test:
1413
strategy:

0 commit comments

Comments
 (0)