summaryrefslogtreecommitdiffstats
path: root/ansible_collections/community/ciscosmb/.github/workflows/CI.yml
blob: 73c71b48e7d68e6b8e8abb68275c49b557da0e5f (plain)
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
# README FIRST
# 1. If you don't have unit tests, remove that section.
# 2. If your collection depends on other collections ensure they are installed,
#    add them to the "test-deps" input.
# 3. For the comprehensive list of the inputs supported by the
#    ansible-community/ansible-test-gh-action GitHub Action, see
#    https://github.com/marketplace/actions/ansible-test.
# 4. If you need help please ask in #ansible-community on the Libera.chat IRC
#    network.

name: CI
on:
  # Run CI against all pushes (direct commits, also merged PRs), Pull Requests
  push:
    branches:
      - main
      - stable-*
  pull_request:
  # Run CI once every Sunday (at 06:00 UTC)
  # This ensures that even if there haven't been commits that we are still
  # testing against latest version of ansible-test for each ansible-core
  # version
  schedule:
    - cron: '0 6 * * 0'
  # manual
  workflow_dispatch:

jobs:

###
# Sanity tests (REQUIRED)
#
# https://docs.ansible.com/ansible/latest/dev_guide/testing_sanity.html

  sanity:
    name: Sanity tests
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        # Ansible Support Matrix
        # https://docs.ansible.com/ansible/latest/reference_appendices/release_and_maintenance.html#ansible-core-support-matrix
        ansible:
          - stable-2.14
          - stable-2.15
          - stable-2.16
          - devel
        python:
          - 3.11
        os:
          - ubuntu-22.04
    steps:
      - name: Sanity testing
        uses: ansible-community/ansible-test-gh-action@release/v1
        with:
          ansible-core-version: ${{ matrix.ansible }}
          target-python-version: ${{ matrix.python }}
          testing-type: sanity
          test-deps: >-
            ansible.netcommon

###
# Unit tests (OPTIONAL)
#
# https://docs.ansible.com/ansible/latest/dev_guide/testing_units.html

  units:
    name: Unit tests (${{ matrix.ansible }}+py${{ matrix.python }})
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        # Ansible Support matrix
        # https://docs.ansible.com/ansible/latest/reference_appendices/release_and_maintenance.html#ansible-core-support-matrix
        ansible:
          - stable-2.14
          - stable-2.15
          - stable-2.16
          - devel
        python:
          # - "2.7" no support for old Python
          - "3.5"
          - "3.6"
          - "3.7"
          - "3.8"
          - "3.9"
          - "3.10"
          - "3.11"
          - "3.12"
        os:
          - ubuntu-22.04
        exclude:
          # no support 
          - ansible: stable-2.14
            python: "3.12"
          - ansible: stable-2.15
            python: "3.12"
          - ansible: stable-2.16
            python: "3.5"
          - ansible: devel
            python: "3.5"
          - ansible: devel
            python: "3.6"
          - ansible: devel
            python: "3.7"

    steps:
      - name: Unit testing
        uses: ansible-community/ansible-test-gh-action@release/v1
        with:
          ansible-core-version: ${{ matrix.ansible }}
          target-python-version: ${{ matrix.python }}
          testing-type: units
          test-deps: >-
            ansible.netcommon
            ansible.utils