summaryrefslogtreecommitdiffstats
path: root/ansible_collections/cisco/meraki/workflows/sanity_tests.yml
blob: 4a29d224a1a305f32853f106413f2a41dc62a67c (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
name: CI
on:
  push:
  pull_request:
  schedule:
    - cron: '0 6 * * *'
env:
  NAMESPACE: cisco
  COLLECTION_NAME: meraki 
jobs:
  sanity:
    name: Sanity (Ⓐ${{ matrix.ansible }})
    strategy:
      matrix:
        ansible:
          - stable-2.10
          - stable-2.11
    runs-on: ubuntu-latest
    steps:
      - name: Check out code
        uses: actions/checkout@v2
        with:
          path: meraki/meraki-ansible
      - name: Create directory
        run: mkdir -p ./ansible_collections/${{env.NAMESPACE}}
      - name: Move repository
        run: mv ./meraki/meraki-ansible ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}
      - name: Set up Python
        uses: actions/setup-python@v2
        with:
          python-version: 3.8
      - name: Install ansible-base (${{ matrix.ansible }})
        run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check
      - name: Run sanity tests
        run: ansible-test sanity --docker -v --color
        working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}