Skip to content

Commit 71cb973

Browse files
ci: rework ansible-lint
1 parent f396e1c commit 71cb973

File tree

2 files changed

+21
-17
lines changed

2 files changed

+21
-17
lines changed

.github/workflows/lint.yml

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,29 @@
11
name: molecule lint
22

33
on:
4-
push:
5-
branches:
6-
- develop
7-
- feature/*
8-
pull_request:
9-
branches:
10-
- develop
11-
types: [opened, synchronize, reopened]
4+
pull_request:
5+
push:
6+
branches:
7+
- master
8+
129
jobs:
1310
lint:
14-
runs-on: ubuntu-18.04
15-
strategy:
16-
fail-fast: true
11+
name: Lint
12+
runs-on: ubuntu-latest
1713
steps:
18-
- name: checkout
19-
uses: actions/checkout@v3
14+
- name: Check out the codebase.
15+
uses: actions/checkout@v2
2016
with:
2117
path: "${{ github.repository }}"
22-
- name: Molecule for Ansible - lint
23-
uses: MonolithProjects/[email protected]
18+
19+
- name: Set up Python 3.
20+
uses: actions/setup-python@v2
2421
with:
25-
molecule_command: lint
22+
python-version: '3.x'
23+
24+
- name: Install test dependencies.
25+
run: pip3 install ansible-lint yamllint
26+
27+
- name: Lint code.
28+
run: |
29+
ansible-lint --exclude molecule/ --exclude .github/

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: molecule test
33
on:
44
pull_request:
55
branches:
6-
- main
6+
- master
77
types: [opened, synchronize, reopened]
88
paths:
99
- 'defaults/**'

0 commit comments

Comments
 (0)