-
Notifications
You must be signed in to change notification settings - Fork 4
49 lines (43 loc) · 1.31 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
---
name: CI
on:
push:
branches:
- main
pull_request:
env:
COLORTERM: 'yes'
TERM: 'xterm-256color'
PYTEST_ADDOPTS: '--color=yes'
jobs:
CI:
runs-on: ubuntu-latest
strategy:
matrix:
python_version: ["3.11"]
steps:
- name: Check out code
uses: actions/checkout@v3
with:
path: ansible_collections/middleware_automation/janus
- name: Set up Python ${{ matrix.python_version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python_version }}
cache: 'pip'
- name: Install yamllint, ansible and molecule
run: |
python -m pip install --upgrade pip
pip install yamllint ansible-core flake8 ansible-lint voluptuous
if [ -f ansible_collections/middleware_automation/janus/requirements.txt ]; then
pip install -r ansible_collections/middleware_automation/janus/requirements.txt
fi
- name: Create default collection path
run: |
mkdir -p /home/runner/.ansible/
ln -s /home/runner/work/janus/janus /home/runner/.ansible/collections
- name: Run linter
run: |
ansible-lint --version
ansible-lint -v
working-directory: ./ansible_collections/middleware_automation/janus