-
Notifications
You must be signed in to change notification settings - Fork 1
41 lines (40 loc) · 1.24 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
name: "Continuous Integration"
on:
workflow_dispatch:
pull_request:
jobs:
install_python_requirements:
name: Install Python requirements
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
- name: Cache Python dependencies
uses: actions/cache@v3
id: python-dependencies
with:
path: ${{ env.pythonLocation }}
key: ${{ runner.os }}-python-dependencies-${{ hashFiles('**/requirements.txt') }}
- name: Install dependencies
run: pip install -r requirements.txt
lint_ansible_files:
name: Lint ansible files
runs-on: ubuntu-20.04
needs: [install_python_requirements]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
- name: Cache Python dependencies
uses: actions/cache@v3
id: python-dependencies
with:
path: ${{ env.pythonLocation }}
key: ${{ runner.os }}-python-dependencies-${{ hashFiles('**/requirements.txt') }}
- name: Check installed package
run: pip freeze
- name: Run ansible lint
run: ansible-lint --offline