[WIFI-11902] Chg: switch scheduled tests to latest release by default (#759)

Signed-off-by: Dmitry Dunaev <dmitry@opsfleet.com>

Signed-off-by: Dmitry Dunaev <dmitry@opsfleet.com>
This commit is contained in:
Dmitry Dunaev
2022-12-27 18:26:57 +03:00
committed by GitHub
parent 09e893f49b
commit b2391a9ef6
10 changed files with 228 additions and 1 deletions

View File

@@ -10,16 +10,45 @@ env:
on:
workflow_dispatch:
inputs:
tests_release:
required: false
default: ""
description: "Tests release branch to use (i.e. 'release/v2.8.0' or 'master'). If left empty, latest release branch is used"
defaults:
run:
shell: bash
jobs:
vars:
runs-on: ubuntu-latest
outputs:
tests_release: ${{ steps.vars.outputs.tests_release }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: set variables
id: vars
run: |
LATEST_TESTS_RELEASE=$(git branch -r | grep 'release/v' | sed 's!\s*origin/!!' | tail -1)
if [[ -z "${{ github.event.inputs.tests_release }}" ]]; then
echo "Tests release was not passed, using branch $LATEST_TESTS_RELEASE"
echo "tests_release=$LATEST_TESTS_RELEASE" >> $GITHUB_OUTPUT
else
echo "Tests release was passed - ${{ github.event.inputs.tests_release }}"
echo "tests_release=${{ github.event.inputs.tests_release }}" >> $GITHUB_OUTPUT
fi
build:
runs-on: ubuntu-latest
needs: ["vars"]
steps:
- uses: actions/checkout@v3
with:
ref: ${{ needs.vars.outputs.tests_release }}
- name: build and push Docker image
uses: ./.github/actions/build-and-push-docker
with:

View File

@@ -23,6 +23,10 @@ on:
marker_overwrite:
description: overwrite the Pytest markers that will be selected, will disable report uploading
required: false
tests_release:
required: false
default: ""
description: "Tests release branch to use (i.e. 'release/v2.8.0' or 'master'). If left empty, latest release branch is used"
schedule:
- cron: "35 20 * * *"
@@ -42,8 +46,13 @@ jobs:
firmware: ${{ steps.vars.outputs.firmware }}
marker_expression: ${{ steps.vars.outputs.marker_expression }}
existing_controller: ${{ steps.vars.outputs.existing_controller }}
tests_release: ${{ steps.vars.outputs.tests_release }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: set variables
id: vars
run: |
@@ -59,11 +68,22 @@ jobs:
echo "firmware=$(echo ${{ github.event.inputs.firmware || 'next-latest' }})" >> $GITHUB_OUTPUT
echo "marker_expression=$(echo ${{ github.event.inputs.marker_expression || 'uc_sanity' }})" >> $GITHUB_OUTPUT
echo "existing_controller=$(echo ${{ github.event.inputs.existing_controller || 'qa01' }})" >> $GITHUB_OUTPUT
LATEST_TESTS_RELEASE=$(git branch -r | grep 'release/v' | sed 's!\s*origin/!!' | tail -1)
if [[ -z "${{ github.event.inputs.tests_release }}" ]]; then
echo "Tests release was not passed, using branch $LATEST_TESTS_RELEASE"
echo "tests_release=$LATEST_TESTS_RELEASE" >> $GITHUB_OUTPUT
else
echo "Tests release was passed - ${{ github.event.inputs.tests_release }}"
echo "tests_release=${{ github.event.inputs.tests_release }}" >> $GITHUB_OUTPUT
fi
build:
runs-on: ubuntu-latest
needs: ["vars"]
steps:
- uses: actions/checkout@v3
with:
ref: ${{ needs.vars.outputs.tests_release }}
- name: build and push Docker image
uses: ./.github/actions/build-and-push-docker
with:

View File

@@ -19,6 +19,10 @@ on:
marker_overwrite:
description: overwrite the Pytest markers that will be selected, will disable report uploading
required: false
tests_release:
required: false
default: ""
description: "Tests release branch to use (i.e. 'release/v2.8.0' or 'master'). If left empty, latest release branch is used"
schedule:
- cron: "30 20 * * *"
@@ -37,8 +41,13 @@ jobs:
ap_version: ${{ steps.vars.outputs.ap_version}}
marker_expression: ${{ steps.vars.outputs.marker_expression }}
existing_controller: ${{ steps.vars.outputs.existing_controller }}
tests_release: ${{ steps.vars.outputs.tests_release }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: set variables
id: vars
run: |
@@ -53,10 +62,22 @@ jobs:
echo "ap_version=$(echo ${{ github.event.inputs.ap_version || 'next-latest' }})" >> $GITHUB_OUTPUT
echo "marker_expression=$(echo ${{ github.event.inputs.marker_expression || 'uc_sanity' }})" >> $GITHUB_OUTPUT
echo "existing_controller=$(echo ${{ github.event.inputs.existing_controller || 'qa01' }})" >> $GITHUB_OUTPUT
LATEST_TESTS_RELEASE=$(git branch -r | grep 'release/v' | sed 's!\s*origin/!!' | tail -1)
if [[ -z "${{ github.event.inputs.tests_release }}" ]]; then
echo "Tests release was not passed, using branch $LATEST_TESTS_RELEASE"
echo "tests_release=$LATEST_TESTS_RELEASE" >> $GITHUB_OUTPUT
else
echo "Tests release was passed - ${{ github.event.inputs.tests_release }}"
echo "tests_release=${{ github.event.inputs.tests_release }}" >> $GITHUB_OUTPUT
fi
build:
runs-on: ubuntu-latest
needs: ["vars"]
steps:
- uses: actions/checkout@v3
with:
ref: ${{ needs.vars.outputs.tests_release }}
- name: build and push Docker image
uses: ./.github/actions/build-and-push-docker
with:

View File

@@ -23,6 +23,10 @@ on:
description: Testbed to run on
default: interop-02
required: false
tests_release:
required: false
default: ""
description: "Tests release branch to use (i.e. 'release/v2.8.0' or 'master'). If left empty, latest release branch is used"
# schedule:
# - cron: "0 2 ? * SAT"
@@ -37,8 +41,13 @@ jobs:
devices: ${{ steps.vars.outputs.devices }}
marker_overwrite: ${{ steps.vars.outputs.marker_overwrite }}
testbed: ${{ steps.vars.output.devices }}
tests_release: ${{ steps.vars.outputs.tests_release }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: set variables
id: vars
run: |
@@ -50,11 +59,22 @@ jobs:
devices=${DEVICES}
EOF
echo "testbed=${{ github.event.inputs.testbed || '' }}" >> $GITHUB_OUTPUT
LATEST_TESTS_RELEASE=$(git branch -r | grep 'release/v' | sed 's!\s*origin/!!' | tail -1)
if [[ -z "${{ github.event.inputs.tests_release }}" ]]; then
echo "Tests release was not passed, using branch $LATEST_TESTS_RELEASE"
echo "tests_release=$LATEST_TESTS_RELEASE" >> $GITHUB_OUTPUT
else
echo "Tests release was passed - ${{ github.event.inputs.tests_release }}"
echo "tests_release=${{ github.event.inputs.tests_release }}" >> $GITHUB_OUTPUT
fi
build:
runs-on: ubuntu-latest
needs: ["vars"]
steps:
- uses: actions/checkout@v3
with:
ref: ${{ needs.vars.outputs.tests_release }}
- name: build and push Docker image
uses: ./.github/actions/build-and-push-docker
with:

View File

@@ -32,16 +32,44 @@ on:
default: "false"
description: "check if the report should be uploaded to S3"
required: false
tests_release:
required: false
default: ""
description: "Tests release branch to use (i.e. 'release/v2.8.0' or 'master'). If left empty, latest release branch is used"
defaults:
run:
shell: bash
jobs:
build:
vars:
runs-on: ubuntu-latest
outputs:
tests_release: ${{ steps.vars.outputs.tests_release }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: set variables
id: vars
run: |
LATEST_TESTS_RELEASE=$(git branch -r | grep 'release/v' | sed 's!\s*origin/!!' | tail -1)
if [[ -z "${{ github.event.inputs.tests_release }}" ]]; then
echo "Tests release was not passed, using branch $LATEST_TESTS_RELEASE"
echo "tests_release=$LATEST_TESTS_RELEASE" >> $GITHUB_OUTPUT
else
echo "Tests release was passed - ${{ github.event.inputs.tests_release }}"
echo "tests_release=${{ github.event.inputs.tests_release }}" >> $GITHUB_OUTPUT
fi
build:
runs-on: ubuntu-latest
needs: ["vars"]
steps:
- uses: actions/checkout@v3
with:
ref: ${{ needs.vars.outputs.tests_release }}
- name: build and push Docker image
uses: ./.github/actions/build-and-push-docker
with:

View File

@@ -36,6 +36,10 @@ on:
required: false
default: ""
description: "Use an existing cloud controller, e.g. like qa01 instead of dynamic one"
tests_release:
required: false
default: ""
description: "Tests release branch to use (i.e. 'release/v2.8.0' or 'master'). If left empty, latest release branch is used"
schedule:
- cron: "30 20 * * 6"
@@ -49,8 +53,13 @@ jobs:
ap_version: ${{ steps.vars.outputs.ap_version}}
marker_expressions: ${{ steps.vars.outputs.marker_expressions }}
existing_controller: ${{ steps.vars.outputs.existing_controller }}
tests_release: ${{ steps.vars.outputs.tests_release }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: set variables
id: vars
run: |
@@ -69,12 +78,23 @@ jobs:
cat >> $GITHUB_OUTPUT << EOF
ap_models=${AP_MODELS}
EOF
LATEST_TESTS_RELEASE=$(git branch -r | grep 'release/v' | sed 's!\s*origin/!!' | tail -1)
if [[ -z "${{ github.event.inputs.tests_release }}" ]]; then
echo "Tests release was not passed, using branch $LATEST_TESTS_RELEASE"
echo "tests_release=$LATEST_TESTS_RELEASE" >> $GITHUB_OUTPUT
else
echo "Tests release was passed - ${{ github.event.inputs.tests_release }}"
echo "tests_release=${{ github.event.inputs.tests_release }}" >> $GITHUB_OUTPUT
fi
# Build test image
build:
runs-on: ubuntu-latest
needs: ["vars"]
steps:
- uses: actions/checkout@v3
with:
ref: ${{ needs.vars.outputs.tests_release }}
- name: build and push Docker image
uses: ./.github/actions/build-and-push-docker
with:

View File

@@ -19,6 +19,10 @@ on:
required: true
default: 'advance'
description: 'Marker expression to select tests to execute'
tests_release:
required: false
default: ""
description: "Tests release branch to use (i.e. 'release/v2.8.0' or 'master'). If left empty, latest release branch is used"
schedule:
- cron: '30 20 * * *'
@@ -34,8 +38,13 @@ jobs:
ap_models: ${{ steps.vars.outputs.ap_models}}
ap_version: ${{ steps.vars.outputs.ap_version}}
marker_expression: ${{ steps.vars.outputs.marker_expression }}
tests_release: ${{ steps.vars.outputs.tests_release }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: set variables
id: vars
run: |
@@ -43,6 +52,14 @@ jobs:
echo "ap_models=$(echo ${{ github.event.inputs.ap_models || 'edgecore_eap102,cig_wf194c4' }})" >> $GITHUB_OUTPUT
echo "ap_version=$(echo ${{ github.event.inputs.ap_version || 'next-latest' }})" >> $GITHUB_OUTPUT
echo "marker_expression=$(echo ${{ github.event.inputs.marker_expression || 'advance' }})" >> $GITHUB_OUTPUT
LATEST_TESTS_RELEASE=$(git branch -r | grep 'release/v' | sed 's!\s*origin/!!' | tail -1)
if [[ -z "${{ github.event.inputs.tests_release }}" ]]; then
echo "Tests release was not passed, using branch $LATEST_TESTS_RELEASE"
echo "tests_release=$LATEST_TESTS_RELEASE" >> $GITHUB_OUTPUT
else
echo "Tests release was passed - ${{ github.event.inputs.tests_release }}"
echo "tests_release=${{ github.event.inputs.tests_release }}" >> $GITHUB_OUTPUT
fi
generate-matrix:
name: generate AP model matrix
@@ -63,8 +80,11 @@ jobs:
build:
runs-on: ubuntu-latest
needs: ["vars"]
steps:
- uses: actions/checkout@v3
with:
ref: ${{ needs.vars.outputs.tests_release }}
- name: build and push Docker image
uses: ./.github/actions/build-and-push-docker
with:

View File

@@ -29,20 +29,47 @@ on:
marker_expression:
description: "marker expression that will be passed to pytest's -m"
required: true
tests_release:
required: false
default: ""
description: "Tests release branch to use (i.e. 'release/v2.8.0' or 'master'). If left empty, latest release branch is used"
defaults:
run:
shell: bash
jobs:
vars:
runs-on: ubuntu-latest
outputs:
tests_release: ${{ steps.vars.outputs.tests_release }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: set variables
id: vars
run: |
LATEST_TESTS_RELEASE=$(git branch -r | grep 'release/v' | sed 's!\s*origin/!!' | tail -1)
if [[ -z "${{ github.event.inputs.tests_release }}" ]]; then
echo "Tests release was not passed, using branch $LATEST_TESTS_RELEASE"
echo "tests_release=$LATEST_TESTS_RELEASE" >> $GITHUB_OUTPUT
else
echo "Tests release was passed - ${{ github.event.inputs.tests_release }}"
echo "tests_release=${{ github.event.inputs.tests_release }}" >> $GITHUB_OUTPUT
fi
build:
runs-on: ubuntu-latest
needs: ["vars"]
steps:
# checkout needed repositories
- name: Checkout Testing repo
uses: actions/checkout@v3
with:
path: wlan-testing
ref: ${{ needs.vars.outputs.tests_release }}
- name: Checkout LANforge scripts
uses: actions/checkout@v3

View File

@@ -36,6 +36,11 @@ on:
required: false
default: ""
description: "Use an existing cloud controller, e.g. like qa01 instead of dynamic one"
tests_release:
required: false
default: ""
description: "Tests release branch to use (i.e. 'release/v2.8.0' or 'master'). If left empty, latest release branch is used"
schedule:
- cron: "35 20 * * 0-4"
@@ -49,8 +54,13 @@ jobs:
ap_version: ${{ steps.vars.outputs.ap_version}}
marker_expression: ${{ steps.vars.outputs.marker_expression }}
existing_controller: ${{ steps.vars.outputs.existing_controller }}
tests_release: ${{ steps.vars.outputs.tests_release }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: set variables
id: vars
run: |
@@ -76,12 +86,24 @@ jobs:
cat >> $GITHUB_OUTPUT << EOF
ap_models=${AP_MODELS}
EOF
LATEST_TESTS_RELEASE=$(git branch -r | grep 'release/v' | sed 's!\s*origin/!!' | tail -1)
if [[ -z "${{ github.event.inputs.tests_release }}" ]]; then
echo "Tests release was not passed, using branch $LATEST_TESTS_RELEASE"
echo "tests_release=$LATEST_TESTS_RELEASE" >> $GITHUB_OUTPUT
else
echo "Tests release was passed - ${{ github.event.inputs.tests_release }}"
echo "tests_release=${{ github.event.inputs.tests_release }}" >> $GITHUB_OUTPUT
fi
cat $GITHUB_OUTPUT
# Build test image
build:
runs-on: ubuntu-latest
needs: ["vars"]
steps:
- uses: actions/checkout@v3
with:
ref: ${{ needs.vars.outputs.tests_release }}
- name: build and push Docker image
uses: ./.github/actions/build-and-push-docker
with:

View File

@@ -36,6 +36,10 @@ on:
required: false
default: ""
description: "Use an existing cloud controller, e.g. like qa01 instead of dynamic one"
tests_release:
required: false
default: ""
description: "Tests release branch to use (i.e. 'release/v2.8.0' or 'master'). If left empty, latest release branch is used"
schedule:
- cron: "30 20 * * 5"
@@ -49,8 +53,13 @@ jobs:
ap_version: ${{ steps.vars.outputs.ap_version}}
marker_expressions: ${{ steps.vars.outputs.marker_expressions }}
existing_controller: ${{ steps.vars.outputs.existing_controller }}
tests_release: ${{ steps.vars.outputs.tests_release }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: set variables
id: vars
run: |
@@ -69,12 +78,23 @@ jobs:
cat >> $GITHUB_OUTPUT << EOF
ap_models=${AP_MODELS}
EOF
LATEST_TESTS_RELEASE=$(git branch -r | grep 'release/v' | sed 's!\s*origin/!!' | tail -1)
if [[ -z "${{ github.event.inputs.tests_release }}" ]]; then
echo "Tests release was not passed, using branch $LATEST_TESTS_RELEASE"
echo "tests_release=$LATEST_TESTS_RELEASE" >> $GITHUB_OUTPUT
else
echo "Tests release was passed - ${{ github.event.inputs.tests_release }}"
echo "tests_release=${{ github.event.inputs.tests_release }}" >> $GITHUB_OUTPUT
fi
# Build test image
build:
runs-on: ubuntu-latest
needs: ["vars"]
steps:
- uses: actions/checkout@v3
with:
ref: ${{ needs.vars.outputs.tests_release }}
- name: build and push Docker image
uses: ./.github/actions/build-and-push-docker
with: