[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: on:
workflow_dispatch: 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: defaults:
run: run:
shell: bash shell: bash
jobs: 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: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: ["vars"]
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with:
ref: ${{ needs.vars.outputs.tests_release }}
- name: build and push Docker image - name: build and push Docker image
uses: ./.github/actions/build-and-push-docker uses: ./.github/actions/build-and-push-docker
with: with:

View File

@@ -23,6 +23,10 @@ on:
marker_overwrite: marker_overwrite:
description: overwrite the Pytest markers that will be selected, will disable report uploading description: overwrite the Pytest markers that will be selected, will disable report uploading
required: false 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: schedule:
- cron: "35 20 * * *" - cron: "35 20 * * *"
@@ -42,8 +46,13 @@ jobs:
firmware: ${{ steps.vars.outputs.firmware }} firmware: ${{ steps.vars.outputs.firmware }}
marker_expression: ${{ steps.vars.outputs.marker_expression }} marker_expression: ${{ steps.vars.outputs.marker_expression }}
existing_controller: ${{ steps.vars.outputs.existing_controller }} existing_controller: ${{ steps.vars.outputs.existing_controller }}
tests_release: ${{ steps.vars.outputs.tests_release }}
steps: steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: set variables - name: set variables
id: vars id: vars
run: | run: |
@@ -59,11 +68,22 @@ jobs:
echo "firmware=$(echo ${{ github.event.inputs.firmware || 'next-latest' }})" >> $GITHUB_OUTPUT 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 "marker_expression=$(echo ${{ github.event.inputs.marker_expression || 'uc_sanity' }})" >> $GITHUB_OUTPUT
echo "existing_controller=$(echo ${{ github.event.inputs.existing_controller || 'qa01' }})" >> $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: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: ["vars"]
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with:
ref: ${{ needs.vars.outputs.tests_release }}
- name: build and push Docker image - name: build and push Docker image
uses: ./.github/actions/build-and-push-docker uses: ./.github/actions/build-and-push-docker
with: with:

View File

@@ -19,6 +19,10 @@ on:
marker_overwrite: marker_overwrite:
description: overwrite the Pytest markers that will be selected, will disable report uploading description: overwrite the Pytest markers that will be selected, will disable report uploading
required: false 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: schedule:
- cron: "30 20 * * *" - cron: "30 20 * * *"
@@ -37,8 +41,13 @@ jobs:
ap_version: ${{ steps.vars.outputs.ap_version}} ap_version: ${{ steps.vars.outputs.ap_version}}
marker_expression: ${{ steps.vars.outputs.marker_expression }} marker_expression: ${{ steps.vars.outputs.marker_expression }}
existing_controller: ${{ steps.vars.outputs.existing_controller }} existing_controller: ${{ steps.vars.outputs.existing_controller }}
tests_release: ${{ steps.vars.outputs.tests_release }}
steps: steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: set variables - name: set variables
id: vars id: vars
run: | run: |
@@ -53,10 +62,22 @@ jobs:
echo "ap_version=$(echo ${{ github.event.inputs.ap_version || 'next-latest' }})" >> $GITHUB_OUTPUT 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 "marker_expression=$(echo ${{ github.event.inputs.marker_expression || 'uc_sanity' }})" >> $GITHUB_OUTPUT
echo "existing_controller=$(echo ${{ github.event.inputs.existing_controller || 'qa01' }})" >> $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: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: ["vars"]
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with:
ref: ${{ needs.vars.outputs.tests_release }}
- name: build and push Docker image - name: build and push Docker image
uses: ./.github/actions/build-and-push-docker uses: ./.github/actions/build-and-push-docker
with: with:

View File

@@ -23,6 +23,10 @@ on:
description: Testbed to run on description: Testbed to run on
default: interop-02 default: interop-02
required: false 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: # schedule:
# - cron: "0 2 ? * SAT" # - cron: "0 2 ? * SAT"
@@ -37,8 +41,13 @@ jobs:
devices: ${{ steps.vars.outputs.devices }} devices: ${{ steps.vars.outputs.devices }}
marker_overwrite: ${{ steps.vars.outputs.marker_overwrite }} marker_overwrite: ${{ steps.vars.outputs.marker_overwrite }}
testbed: ${{ steps.vars.output.devices }} testbed: ${{ steps.vars.output.devices }}
tests_release: ${{ steps.vars.outputs.tests_release }}
steps: steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: set variables - name: set variables
id: vars id: vars
run: | run: |
@@ -50,11 +59,22 @@ jobs:
devices=${DEVICES} devices=${DEVICES}
EOF EOF
echo "testbed=${{ github.event.inputs.testbed || '' }}" >> $GITHUB_OUTPUT 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: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: ["vars"]
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with:
ref: ${{ needs.vars.outputs.tests_release }}
- name: build and push Docker image - name: build and push Docker image
uses: ./.github/actions/build-and-push-docker uses: ./.github/actions/build-and-push-docker
with: with:

View File

@@ -32,16 +32,44 @@ on:
default: "false" default: "false"
description: "check if the report should be uploaded to S3" description: "check if the report should be uploaded to S3"
required: false 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: defaults:
run: run:
shell: bash shell: bash
jobs: jobs:
build: vars:
runs-on: ubuntu-latest runs-on: ubuntu-latest
outputs:
tests_release: ${{ steps.vars.outputs.tests_release }}
steps: steps:
- uses: actions/checkout@v3 - 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 - name: build and push Docker image
uses: ./.github/actions/build-and-push-docker uses: ./.github/actions/build-and-push-docker
with: with:

View File

@@ -36,6 +36,10 @@ on:
required: false required: false
default: "" default: ""
description: "Use an existing cloud controller, e.g. like qa01 instead of dynamic one" 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: schedule:
- cron: "30 20 * * 6" - cron: "30 20 * * 6"
@@ -49,8 +53,13 @@ jobs:
ap_version: ${{ steps.vars.outputs.ap_version}} ap_version: ${{ steps.vars.outputs.ap_version}}
marker_expressions: ${{ steps.vars.outputs.marker_expressions }} marker_expressions: ${{ steps.vars.outputs.marker_expressions }}
existing_controller: ${{ steps.vars.outputs.existing_controller }} existing_controller: ${{ steps.vars.outputs.existing_controller }}
tests_release: ${{ steps.vars.outputs.tests_release }}
steps: steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: set variables - name: set variables
id: vars id: vars
run: | run: |
@@ -69,12 +78,23 @@ jobs:
cat >> $GITHUB_OUTPUT << EOF cat >> $GITHUB_OUTPUT << EOF
ap_models=${AP_MODELS} ap_models=${AP_MODELS}
EOF 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 test image
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: ["vars"]
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with:
ref: ${{ needs.vars.outputs.tests_release }}
- name: build and push Docker image - name: build and push Docker image
uses: ./.github/actions/build-and-push-docker uses: ./.github/actions/build-and-push-docker
with: with:

View File

@@ -19,6 +19,10 @@ on:
required: true required: true
default: 'advance' default: 'advance'
description: 'Marker expression to select tests to execute' 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: schedule:
- cron: '30 20 * * *' - cron: '30 20 * * *'
@@ -34,8 +38,13 @@ jobs:
ap_models: ${{ steps.vars.outputs.ap_models}} ap_models: ${{ steps.vars.outputs.ap_models}}
ap_version: ${{ steps.vars.outputs.ap_version}} ap_version: ${{ steps.vars.outputs.ap_version}}
marker_expression: ${{ steps.vars.outputs.marker_expression }} marker_expression: ${{ steps.vars.outputs.marker_expression }}
tests_release: ${{ steps.vars.outputs.tests_release }}
steps: steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: set variables - name: set variables
id: vars id: vars
run: | run: |
@@ -43,6 +52,14 @@ jobs:
echo "ap_models=$(echo ${{ github.event.inputs.ap_models || 'edgecore_eap102,cig_wf194c4' }})" >> $GITHUB_OUTPUT 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 "ap_version=$(echo ${{ github.event.inputs.ap_version || 'next-latest' }})" >> $GITHUB_OUTPUT
echo "marker_expression=$(echo ${{ github.event.inputs.marker_expression || 'advance' }})" >> $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: generate-matrix:
name: generate AP model matrix name: generate AP model matrix
@@ -63,8 +80,11 @@ jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: ["vars"]
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with:
ref: ${{ needs.vars.outputs.tests_release }}
- name: build and push Docker image - name: build and push Docker image
uses: ./.github/actions/build-and-push-docker uses: ./.github/actions/build-and-push-docker
with: with:

View File

@@ -29,20 +29,47 @@ on:
marker_expression: marker_expression:
description: "marker expression that will be passed to pytest's -m" description: "marker expression that will be passed to pytest's -m"
required: true 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: defaults:
run: run:
shell: bash shell: bash
jobs: 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: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: ["vars"]
steps: steps:
# checkout needed repositories # checkout needed repositories
- name: Checkout Testing repo - name: Checkout Testing repo
uses: actions/checkout@v3 uses: actions/checkout@v3
with: with:
path: wlan-testing path: wlan-testing
ref: ${{ needs.vars.outputs.tests_release }}
- name: Checkout LANforge scripts - name: Checkout LANforge scripts
uses: actions/checkout@v3 uses: actions/checkout@v3

View File

@@ -36,6 +36,11 @@ on:
required: false required: false
default: "" default: ""
description: "Use an existing cloud controller, e.g. like qa01 instead of dynamic one" 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: schedule:
- cron: "35 20 * * 0-4" - cron: "35 20 * * 0-4"
@@ -49,8 +54,13 @@ jobs:
ap_version: ${{ steps.vars.outputs.ap_version}} ap_version: ${{ steps.vars.outputs.ap_version}}
marker_expression: ${{ steps.vars.outputs.marker_expression }} marker_expression: ${{ steps.vars.outputs.marker_expression }}
existing_controller: ${{ steps.vars.outputs.existing_controller }} existing_controller: ${{ steps.vars.outputs.existing_controller }}
tests_release: ${{ steps.vars.outputs.tests_release }}
steps: steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: set variables - name: set variables
id: vars id: vars
run: | run: |
@@ -76,12 +86,24 @@ jobs:
cat >> $GITHUB_OUTPUT << EOF cat >> $GITHUB_OUTPUT << EOF
ap_models=${AP_MODELS} ap_models=${AP_MODELS}
EOF 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 test image
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: ["vars"]
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with:
ref: ${{ needs.vars.outputs.tests_release }}
- name: build and push Docker image - name: build and push Docker image
uses: ./.github/actions/build-and-push-docker uses: ./.github/actions/build-and-push-docker
with: with:

View File

@@ -36,6 +36,10 @@ on:
required: false required: false
default: "" default: ""
description: "Use an existing cloud controller, e.g. like qa01 instead of dynamic one" 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: schedule:
- cron: "30 20 * * 5" - cron: "30 20 * * 5"
@@ -49,8 +53,13 @@ jobs:
ap_version: ${{ steps.vars.outputs.ap_version}} ap_version: ${{ steps.vars.outputs.ap_version}}
marker_expressions: ${{ steps.vars.outputs.marker_expressions }} marker_expressions: ${{ steps.vars.outputs.marker_expressions }}
existing_controller: ${{ steps.vars.outputs.existing_controller }} existing_controller: ${{ steps.vars.outputs.existing_controller }}
tests_release: ${{ steps.vars.outputs.tests_release }}
steps: steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: set variables - name: set variables
id: vars id: vars
run: | run: |
@@ -69,12 +78,23 @@ jobs:
cat >> $GITHUB_OUTPUT << EOF cat >> $GITHUB_OUTPUT << EOF
ap_models=${AP_MODELS} ap_models=${AP_MODELS}
EOF 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 test image
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: ["vars"]
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with:
ref: ${{ needs.vars.outputs.tests_release }}
- name: build and push Docker image - name: build and push Docker image
uses: ./.github/actions/build-and-push-docker uses: ./.github/actions/build-and-push-docker
with: with: