mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 20:20:07 +00:00
.github: Refactor NightlyTests to use workflow in asterisk-ci-actions
(cherry picked from commit d991b22dd8
)
This commit is contained in:
committed by
Asterisk Development Team
parent
0905dfdc1c
commit
c972bb964a
63
.github/workflows/NightlyTests.yml
vendored
63
.github/workflows/NightlyTests.yml
vendored
@@ -6,59 +6,20 @@ on:
|
|||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
description: "Array of branches to run: ['21','master']. Defaults to NIGHTLYTEST_BRANCHES"
|
description: "Array of branches to run: ['21','master']. Defaults to NIGHTLYTEST_BRANCHES"
|
||||||
|
group_list:
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
description: "Array of test groups to run: ['ari1','channels']. Defaults to NIGHTLYTEST_LIST"
|
||||||
|
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 2 * * *'
|
- cron: '0 2 * * *'
|
||||||
|
|
||||||
env:
|
|
||||||
ASTERISK_REPO: ${{ github.repository }}
|
|
||||||
PR_NUMBER: 0
|
|
||||||
PR_COMMIT: ''
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
MODULES_BLACKLIST: ${{ vars.GATETEST_MODULES_BLACKLIST }}
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
AsteriskNightly:
|
NightlyTests:
|
||||||
strategy:
|
name: NightlyTests
|
||||||
fail-fast: false
|
uses: asterisk/asterisk-ci-actions/.github/workflows/AsteriskNightlyTest.yml@main
|
||||||
matrix:
|
with:
|
||||||
branch: ${{ fromJSON( ( inputs.branches || vars.NIGHTLYTEST_BRANCHES ) ) }}
|
branches: ${{ inputs.branches || vars.NIGHTLYTEST_BRANCHES }}
|
||||||
group: ${{ fromJSON(vars.NIGHTLYTEST_LIST) }}
|
group_list: ${{ inputs.group_list || vars.NIGHTLYTEST_LIST }}
|
||||||
runs-on: ubuntu-latest
|
secrets:
|
||||||
steps:
|
TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
- name: Run Nightly Tests for ${{ matrix.group }}/${{ matrix.branch }}
|
|
||||||
uses: asterisk/asterisk-ci-actions/AsteriskGateComposite@main
|
|
||||||
with:
|
|
||||||
test_type: Nightly
|
|
||||||
asterisk_repo: ${{env.ASTERISK_REPO}}
|
|
||||||
pr_number: ${{env.PR_NUMBER}}
|
|
||||||
base_branch: ${{matrix.branch}}
|
|
||||||
modules_blacklist: ${{env.MODULES_BLACKLIST}}
|
|
||||||
github_token: ${{secrets.GITHUB_TOKEN}}
|
|
||||||
testsuite_repo: ${{vars.TESTSUITE_REPO}}
|
|
||||||
gatetest_group: ${{matrix.group}}
|
|
||||||
gatetest_command: ${{ toJSON(fromJSON(vars.GATETEST_COMMANDS)[matrix.group]) }}
|
|
||||||
|
|
||||||
AsteriskNightlyTests:
|
|
||||||
if: ${{ always() }}
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: AsteriskNightly
|
|
||||||
steps:
|
|
||||||
- name: Check test matrix status
|
|
||||||
env:
|
|
||||||
RESULT: ${{needs.AsteriskNightly.result}}
|
|
||||||
run: |
|
|
||||||
case $RESULT in
|
|
||||||
success)
|
|
||||||
echo "::notice::All Testsuite tests passed"
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
skipped)
|
|
||||||
echo "::error::Testsuite tests were skipped because of an earlier failure"
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "::error::One or more Testsuite tests failed"
|
|
||||||
exit 1
|
|
||||||
esac
|
|
||||||
|
Reference in New Issue
Block a user