Skip to content
This repository was archived by the owner on Apr 29, 2026. It is now read-only.

Collect dsBaseClient test suite results #103

Collect dsBaseClient test suite results

Collect dsBaseClient test suite results #103

name: Collect dsBaseClient test suite results
on:
schedule:
- cron: "0 1 * * 1" # run at 1AM UTC on Mondays
workflow_dispatch: # allow manual triggering
jobs:
collect-results:
runs-on: ubuntu-latest
permissions:
contents: write # we need to push into testStatus
env:
REPO_OWNER: ${{ github.repository_owner }}
TARGET_BRANCH: master # Update to latest version
TARGET_OUTPUTS: dsbaseclient-logs
TARGET_PROJECT: dsBaseClient
TARGET_WORKFLOW: dsBaseClient_test_suite.yaml
steps:
- name: Checkout testStatus
uses: actions/checkout@v4
with:
path: testStatus
- name: Download artifacts
uses: dawidd6/action-download-artifact@v6
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
repo: ${{ env.REPO_OWNER }}/${{ env.TARGET_PROJECT }}
workflow: ${{ env.TARGET_WORKFLOW }}
workflow_conclusion: success
branch: ${{ env.TARGET_BRANCH }}
name: ${{ env.TARGET_OUTPUTS }}
path: logs-download
- name: Commit logs into repo
run: |
cd testStatus
branch="${{ env.TARGET_BRANCH }}"
base_path="../logs-download/logs/dsBaseClient/${{ env.TARGET_BRANCH }}"
latest_dir=$(ls -d "$base_path"/*/ 2>/dev/null | sort -V | head -n 1)
runid=$(basename "$latest_dir")
# set up docs and logs directories
mkdir -p logs/dsBaseClient/${branch}/${runid}
# set up latest directory
rm -rf docs/dsBaseClient/${branch}/latest
mkdir -p docs/dsBaseClient/${branch}/latest
# copy new contents
cp -r ../logs-download/logs/dsBaseClient/${branch}/${runid}/* logs/dsBaseClient/${branch}/${runid}/
cp -r ../logs-download/docs/dsBaseClient/${branch}/latest/* docs/dsBaseClient/${branch}/latest/
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
git add .
git commit -m "Results from test suite for ${{ env.TARGET_PROJECT}}/$branch@${runid}. For details, see https://github.com/${{ env.REPO_OWNER }}/${{ env.TARGET_PROJECT}}/actions/runs/${runid} " || echo "No changes"
git push