Giter Club home page Giter Club logo

ansible-test-versions-gh-action's Introduction

ansible-test-versions-gh-action for setting up job matrix in Ansible Collection repositories

GitHub Action for setting up job matrix based on expected ansible, python and docker image support for Ansible Collections.

Usage

To use the action add the following step to your workflow file (e.g. .github/workflows/ansible-test.yml), example for sanity tests:

steps:
  - name: Get the job matrix parameters for ansible-test as JSON
    uses: data-bene/ansible-test-versions-gh-action@release/v1
    id: default-matrix
    with:
      python-version: '[ "3.9" ]'
strategy:
    fail-fast: ${{ inputs.fail-fast }}
    matrix:
      ansible-core-version: ${{ fromJSON(define-matrix.outputs.ansible-core-version) }}
      python-version: ${{ fromJSON(define-matrix.outputs.python-version) }}
      target-python-version: ${{ fromJSON(define-matrix.outputs.target-python-version) }}
      exclude: ${{ fromJSON(define-matrix.outputs.target-python-exclude) }}

And for integration tests:

steps:
  - name: Get the job matrix parameters for ansible-test as JSON
    uses: data-bene/ansible-test-versions-gh-action@release/v1
    id: default-matrix
    with:
      docker-image: '[ "ubuntu2004" ]'
      docker-include: '[]'
strategy:
    fail-fast: ${{ inputs.fail-fast }}
    matrix:
      ansible-core-version: ${{ fromJSON(define-matrix.outputs.ansible-core-version) }}
      python-version: ${{ fromJSON(define-matrix.outputs.python-version) }}
      docker-image: ${{ fromJSON(define-matrix.outputs.docker-image) }}
      exclude: ${{ fromJSON(define-matrix.outputs.docker-exclude) }}
      include: ${{ fromJSON(define-matrix.outputs.docker-include) }}

Pro tip: instead of using branch pointers, like main, pin versions of Actions that you use to tagged versions or SHA-1 commit identifiers. This will make your workflows more secure and better reproducible, saving you from sudden and unpleasant surprises.

inputs

When set the inputs replace the default values, inputs MUST be JSON.

  • ansible-core-version: Array of ansible versions (required: false)
  • docker-exclude: Array of matrix excludes for docker (required: false)
  • docker-image: Array of docker images (required: false)
  • docker-include: Array of matrix includes for docker (required: false)
  • python-version: Array of python versions (controler) (required: false)
  • target-python-exclude: Array of excludes target python versions (required: false)
  • target-python-version: Array of target python versions (managed) (required: false)

outputs

JSON outputs:

  • ansible-core-version: Array of ansible versions
  • docker-exclude: Array of matrix excludes for docker
  • docker-image: Array of docker images
  • docker-include: Array of matrix includes for docker
  • python-version: Array of python versions (controler)
  • target-python-exclude: Array of excludes target python versions
  • target-python-version: Array of target python versions (managed)

Developed and Sponsored by

Data Bene

ansible-test-versions-gh-action's People

Contributors

c2main avatar eugenberd avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.