This repository has been archived by the owner on Feb 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
73 lines (67 loc) · 2.15 KB
/
main.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
name: Pure Storage Ansible CI
"on":
pull_request:
push:
schedule:
- cron: '25 10 * * *'
jobs:
build:
name: Build purefusion on Ansible ${{ matrix.ansible }} (Python ${{ matrix.python-version }})
runs-on: ubuntu-20.04
strategy:
matrix:
ansible:
- stable-2.11
- stable-2.12
- stable-2.13
- stable-2.14
- stable-2.15
- stable-2.16
- devel
python-version:
- 3.8
- 3.9
- "3.10"
- "3.11"
exclude:
- python-version: "3.11"
ansible: stable-2.11
- python-version: "3.11"
ansible: stable-2.12
- python-version: "3.11"
ansible: stable-2.13
- python-version: "3.10"
ansible: stable-2.11
- python-version: 3.8
ansible: stable-2.14
- python-version: 3.8
ansible: stable-2.15
- python-version: 3.8
ansible: stable-2.16
- python-version: 3.9
ansible: stable-2.16
- python-version: 3.8
ansible: devel
- python-version: 3.9
ansible: devel
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python${{ matrix.python }} -m pip install --upgrade pip
python${{ matrix.python }} -m pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check
python${{ matrix.python }} -m pip install purefusion pytest
- name: Run sanity tests
run: |
pwd
mkdir -p ansible_collections/purestorage/fusion
rsync -av . ansible_collections/purestorage/fusion --exclude ansible_collection/purestorage/fusion
cd ansible_collections/purestorage/fusion
ansible-test sanity -v --color --python ${{ matrix.python-version }} --docker
- name: Run unit tests
run: python -m pytest --import-mode=append tests