Weekly Tests #116
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Weekly Tests | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 0 * * SAT" | |
jobs: | |
weekly-tests: | |
name: Run weekly tests | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 1440 | |
strategy: | |
max-parallel: 3 | |
fail-fast: false | |
matrix: | |
repo: | |
- charm-advanced-routing | |
- charm-apt-mirror | |
- charm-cloudsupport | |
- charm-duplicity | |
- charm-juju-backup-all | |
- charm-juju-local | |
- charm-local-users | |
- charm-logrotated | |
- charm-nginx | |
- charm-nrpe | |
- charm-openstack-service-checks | |
- charm-prometheus-blackbox-exporter | |
- charm-prometheus-juju-exporter | |
- charm-prometheus-libvirt-exporter | |
- charm-simple-streams | |
- charm-storage-connector | |
- charm-sysconfig | |
- charm-userdir-ldap | |
- charmed-openstack-upgrader | |
- juju-backup-all | |
- juju-lint | |
- openstack-exporter-operator | |
- prometheus-hardware-exporter | |
- prometheus-juju-backup-all-exporter | |
- snap-tempest | |
workflow_file_name: | |
- check.yaml | |
include: | |
- repo: hardware-observer-operator | |
workflow_file_name: check.yaml | |
- repo: hardware-observer-operator | |
workflow_file_name: cos_integration.yaml | |
- repo: prometheus-juju-exporter | |
workflow_file_name: pr.yaml | |
steps: | |
- name: Run ${{ matrix.workflow_file_name }} tests for ${{ matrix.repo }} | |
uses: convictional/[email protected] | |
id: dispatched-tests | |
with: | |
owner: canonical | |
repo: ${{ matrix.repo }} | |
github_token: ${{ secrets.GHA_WORKFLOW_TRIGGER }} | |
workflow_file_name: ${{ matrix.workflow_file_name }} | |
ref: main | |
wait_interval: 60 | |
- name: Collect results | |
id: collect-result | |
if: always() | |
run: | | |
cat <<-END > "result-${{ strategy.job-index }}.json" | |
{ | |
"job-index": "${{ strategy.job-index }}", | |
"repo": "${{ matrix.repo }}", | |
"branch": "main", | |
"workflow_file_name":"${{ matrix.workflow_file_name }}", | |
"conclusion": "${{ steps.dispatched-tests.outcome }}", | |
"workflow_url": "${{ steps.dispatched-tests.outputs.workflow_url }}" | |
} | |
END | |
- uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: "result-${{ strategy.job-index }}" | |
path: "result-${{ strategy.job-index }}.json" | |
notify: | |
needs: weekly-tests | |
if: always() # always send the summary to mattermost | |
name: Notify SolEng with results | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Collect results | |
uses: actions/download-artifact@v4 | |
with: | |
merge-multiple: true | |
- name: Generate summary message | |
run: | | |
{ | |
echo "results<<EOF" | |
python3 ./scripts/weekly-tests-summary.py "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" | |
echo EOF | |
} >> "$GITHUB_ENV" | |
- name: Send the Mattermost Message | |
uses: mattermost/action-mattermost-notify@master | |
with: | |
MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK_URL }} | |
TEXT: ${{ env.results }} |