Skip to content

Update for 24.3 SR Linux and ansible 2.15, 2.16, 2.17 #78

Update for 24.3 SR Linux and ansible 2.15, 2.16, 2.17

Update for 24.3 SR Linux and ansible 2.15, 2.16, 2.17 #78

Workflow file for this run

# Copyright 2023 Nokia
# Licensed under the BSD 3-Clause License.
# SPDX-License-Identifier: BSD-3-Clause
---
name: CICD
"on":
workflow_dispatch:
inputs:
srlinux-version:
description: "SR Linux version"
required: true
default: "24.3.2"
start-tmate-before-test:
description: "start tmate before running tests"
type: boolean
required: false
default: false
start-tmate-after-test:
description: "start tmate after running tests"
type: boolean
required: false
default: false
pull_request:
push:
tags:
- "v*"
jobs:
prepare-matrix:
runs-on: ubuntu-22.04
outputs:
matrix: ${{ steps.matrix.outputs.output }}
steps:
- uses: actions/checkout@v4
- uses: fabasoad/data-format-converter-action@main
id: matrix
with:
input: ".github/matrix.yml"
from: "yaml"
to: "json"
test:
runs-on: ${{ matrix.runs-on }}
needs:
- prepare-matrix
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.prepare-matrix.outputs.matrix) }}
steps:
# setting env vars for the test based in user input
- name: Set Env vars
run: |
echo "SRLINUX_VERSION=${{ inputs.srlinux-version }}" >> $GITHUB_ENV
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install ansible core
run: pip install ansible-core==${{ matrix.ansible-core-version }}
- name: start tmate session
uses: mxschmitt/action-tmate@v3
if: ${{ inputs.start-tmate-before-test }}
# Uncomment this section to use private images
# - name: ghcr.io login
# uses: docker/login-action@v2
# with:
# registry: ghcr.io
# username: ${{ github.actor }}
# password: ${{ secrets.GITHUB_TOKEN }}
- name: Test
run: ./run.sh ci-test
# uncomment this line when you want to continue on error
# and run tmate after it
# continue-on-error: true
- name: start tmate session
uses: mxschmitt/action-tmate@v3
if: ${{ inputs.start-tmate-after-test }}
ansible-sanity-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Install ansible core
run: pip install ansible-core==2.15.12
- name: Ansible sanity test
run: ./run.sh sanity-test