Skip to content

Weekly Tests

Weekly Tests #93

Workflow file for this run

name: Weekly Tests
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * SAT"
jobs:
weekly-tests:
name: Run weekly tests
runs-on: ubuntu-latest
timeout-minutes: 1440
strategy:
max-parallel: 3
fail-fast: false
matrix:
include:
- repo: charm-advanced-routing
workflow_file_name: check.yaml
branch: main
- repo: charm-apt-mirror
workflow_file_name: check.yaml
branch: main
- repo: charm-cloudsupport
workflow_file_name: check.yaml
branch: main
- repo: charm-duplicity
workflow_file_name: check.yaml
branch: main
- repo: charm-juju-backup-all
workflow_file_name: check.yaml
branch: main
- repo: charm-juju-local
workflow_file_name: check.yaml
branch: main
- repo: charm-kubernetes-service-checks
workflow_file_name: check.yaml
branch: main
- repo: charm-local-users
workflow_file_name: check.yaml
branch: main
- repo: charm-logrotated
workflow_file_name: check.yaml
branch: main
- repo: charm-nginx
workflow_file_name: check.yaml
branch: main
- repo: charm-nrpe
workflow_file_name: check.yaml
branch: main
- repo: charm-openstack-service-checks
workflow_file_name: check.yaml
branch: main
- repo: charm-prometheus-blackbox-exporter
workflow_file_name: check.yaml
branch: main
- repo: charm-prometheus-juju-exporter
workflow_file_name: check.yaml
branch: main
- repo: charm-prometheus-libvirt-exporter
workflow_file_name: check.yaml
branch: main
- repo: charm-simple-streams
workflow_file_name: check.yaml
branch: main
- repo: charm-storage-connector
workflow_file_name: check.yaml
branch: main
- repo: charm-sysconfig
workflow_file_name: check.yaml
branch: main
- repo: charm-userdir-ldap
workflow_file_name: check.yaml
branch: main
- repo: charmed-openstack-upgrader
workflow_file_name: check.yaml
branch: main
- repo: hardware-observer-operator
workflow_file_name: check.yaml
branch: main
- repo: hardware-observer-operator
workflow_file_name: cos_integration.yaml
branch: main
- repo: openstack-exporter-operator
workflow_file_name: pull-request.yaml
branch: main
- repo: prometheus-hardware-exporter
workflow_file_name: check.yaml
branch: main
- repo: prometheus-juju-backup-all-exporter
workflow_file_name: check.yaml
branch: main
- repo: prometheus-juju-exporter
workflow_file_name: pr.yaml
branch: main
- repo: snap-tempest
workflow_file_name: pr.yaml
branch: main
- repo: juju-lint
workflow_file_name: check.yaml
branch: main
- repo: juju-backup-all
workflow_file_name: check.yaml
branch: main
steps:
- name: Running ${{ 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: ${{ matrix.branch }}
wait_interval: 60
- name: Collect result
id: collect-result
if: always()
run: |
result=$(cat <<-END
{
"job-index": "${{ strategy.job-index }}",
"repo": "${{ matrix.repo }}",
"branch": "${{ matrix.branch }}",
"workflow_file_name":"${{ matrix.workflow_file_name }}",
"conclusion": "${{ steps.dispatched-tests.outcome }}",
"workflow_url": "${{ steps.dispatched-tests.outputs.workflow_url }}"
}
END
)
echo $result > "result-${{ strategy.job-index }}.json"
- 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() # these need to be run always
name: Notify SolEng with results
runs-on: ubuntu-latest
steps:
- name: Collect results
uses: actions/download-artifact@v4
with:
merge-multiple: true
- name: Install jq
run: |
sudo apt update
sudo apt install jq -y
- name: Concatenate results
run: |
{
echo 'results<<EOF'
jq -s '.[] | ["- [\(.repo) (\(.branch), \(.workflow_file_name))](\(.workflow_url)) \(if .conclusion == "success" then ":gh-success-octicon-checkcirclefillicon:" else ":gh-failure-octicon-xcirclefillicon:" end)"]' result-*.json | jq -r 'join("\n")'
echo EOF
} >> "$GITHUB_ENV"
- name: Send the Mattermost Message
uses: mattermost/action-mattermost-notify@master
with:
MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK_URL }}
TEXT: |
:robot_face: @soleng Results from [Weekly tests](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}):
${{ env.results }}