-
Notifications
You must be signed in to change notification settings - Fork 118
86 lines (85 loc) · 2.19 KB
/
default.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
---
name: Verification
on:
push:
branches-ignore:
- main
- master
pull_request:
branches:
- develop
- main
- master
jobs:
pre-commit:
name: pre-commit Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: "3.9"
- uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements*.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pre-commit
- name: Run pre-commit checks
uses: pre-commit/[email protected]
molecule:
name: Molecule Test
runs-on: ubuntu-latest
strategy:
fail-fast: false
max-parallel: 4
matrix:
molecule_distro:
# - alpine313
# - alpine314
# - centos7
# - centos8
# - debian8
- debian10
- debian11
- debian12
# - fedora
# - fedora34
# - fedora35
- rocky8
- rocky9
# - ubuntu1604
- ubuntu1804
- ubuntu2004
- ubuntu2204
python-version: [3.9]
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements*.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt -r requirements-dev.txt
pip install pre-commit
- name: Test with molecule
run: |
molecule test --scenario-name ${{ matrix.molecule_distro }}