mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-02 11:06:31 +00:00
.github: Refactor NightlyTests to use workflow in asterisk-ci-actions
This commit is contained in:
63
.github/workflows/NightlyTests.yml
vendored
63
.github/workflows/NightlyTests.yml
vendored
@@ -6,59 +6,20 @@ on:
|
||||
required: false
|
||||
type: string
|
||||
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:
|
||||
- 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:
|
||||
AsteriskNightly:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
branch: ${{ fromJSON( ( inputs.branches || vars.NIGHTLYTEST_BRANCHES ) ) }}
|
||||
group: ${{ fromJSON(vars.NIGHTLYTEST_LIST) }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- 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
|
||||
NightlyTests:
|
||||
name: NightlyTests
|
||||
uses: asterisk/asterisk-ci-actions/.github/workflows/AsteriskNightlyTest.yml@main
|
||||
with:
|
||||
branches: ${{ inputs.branches || vars.NIGHTLYTEST_BRANCHES }}
|
||||
group_list: ${{ inputs.group_list || vars.NIGHTLYTEST_LIST }}
|
||||
secrets:
|
||||
TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
Reference in New Issue
Block a user