Debian Codegraph @

ansible_collections/dellemc/powerflex/.github/workflows/ansible-test.yml

raw symbols SCIP
1 name: CI
2
3 on:
4 workflow_dispatch:
5 push:
6 branches: [main]
7 pull_request:
8 schedule:
9 - cron: '0 2 * * *'
10
11 jobs:
12 build:
13 name: Build collection
14 runs-on: ubuntu-latest
15 strategy:
16 fail-fast: false
17 matrix:
18 ansible-version: [stable-2.19]
19 steps:
20 - name: Check out code
21 uses: actions/checkout@v4
22
23 - name: Set up Python
24 uses: actions/setup-python@v4
25 with:
26 python-version: 3.13
27
28 - name: Install ansible (${{ matrix.ansible-version }})
29 run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible-version }}.tar.gz --disable-pip-version-check
30
31 - name: Build a collection tarball
32 run: ansible-galaxy collection build --output-path "${GITHUB_WORKSPACE}/.cache/collection-tarballs"
33
34 - name: Store migrated collection artifacts
35 uses: actions/upload-artifact@v4
36 with:
37 name: collection
38 path: .cache/collection-tarballs
39
40 ###
41 # Unit tests (OPTIONAL)
42 #
43 # https://docs.ansible.com/ansible/latest/dev_guide/testing_units.html
44
45 unit:
46 name: Unit Tests (Ⓐ${{ matrix.ansible }} with ${{ matrix.python }} python)
47 needs: [build]
48 runs-on: ubuntu-latest
49 strategy:
50 fail-fast: false
51 matrix:
52 python: ['3.11', '3.12', '3.13']
53 ansible:
54 - stable-2.17
55 - stable-2.18
56 - stable-2.19
57 - devel
58 exclude:
59 - ansible: stable-2.16
60 python: '3.13'
61 - ansible: stable-2.17
62 python: '3.13'
63 - ansible: devel
64 python: '3.11'
65
66 steps:
67 - name: Perform unit testing with ansible-test
68 uses: ansible-community/ansible-test-gh-action@release/v1.16
69 with:
70 testing-type: units
71 coverage: ${{ (matrix.python == '3.13' && matrix.ansible == 'stable-2.19') && 'always' || 'never' }}
72 ansible-core-version: ${{ matrix.ansible }}
73 origin-python-version: ${{ matrix.python }}
74 env:
75 CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
76
77 ###
78 # Sanity tests (REQUIRED)
79 #
80 # https://docs.ansible.com/ansible/latest/dev_guide/testing_sanity.html
81
82 sanity:
83 needs: [build]
84 uses: ansible/ansible-content-actions/.github/workflows/sanity.yaml@main
85 ansible-lint:
86 needs: [build]
87 uses: ansible/ansible-content-actions/.github/workflows/ansible_lint.yaml@main