-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (66 loc) · 2.23 KB
/
Copy pathci.yml
File metadata and controls
69 lines (66 loc) · 2.23 KB
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
---
name: CI
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
on:
pull_request:
push:
branches:
- main
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- name: Run ansible-lint
uses: ansible/ansible-lint@8ba9595a4acd1b906eb75568b34f6ef592cd1528
with:
requirements_file: "examples/requirements.yml"
- name: Run markdownlint
uses: DavidAnson/markdownlint-cli2-action@992badcdf24e3b8eb7e87ff9287fe931bcb00c6e
with:
globs: '**/*.md'
config: .markdownlint-cli2.yaml
unit_test_modules:
name: Unit test Ansible modules
runs-on: ubuntu-latest
strategy:
matrix:
ansible-core-version: [stable-2.16, stable-2.17, stable-2.18, stable-2.19]
target-python-version: ["3.10", "3.11", "3.12"]
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- name: Run sanity tests
uses: ansible-community/ansible-test-gh-action@d3a8ec7a59694e25e210fcd44738910149537f0e
with:
ansible-core-version: ${{ matrix.ansible-core-version }}
target-python-version: ${{ matrix.target-python-version }}
testing-type: sanity
- name: Run unit tests
uses: ansible-community/ansible-test-gh-action@d3a8ec7a59694e25e210fcd44738910149537f0e
with:
ansible-core-version: ${{ matrix.ansible-core-version }}
target-python-version: ${{ matrix.target-python-version }}
testing-type: units
# TODO: Uncomment when ready
# molecule:
# name: Molecule
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
# - name: Set up Python 3
# uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405
# with:
# python-version: '3.x'
# - name: Install test dependencies
# run: pip3 install ansible molecule molecule-plugins[docker] docker
# - name: Run Molecule tests
# run: molecule test
# env:
# PY_COLORS: '1'
# ANSIBLE_FORCE_COLOR: '1'