Skip to content

Daily Test

Daily Test #1675

Workflow file for this run

name: Daily Test
permissions:
contents: read
on:
workflow_dispatch:
schedule:
# Runs daily at a weird time (03:17 UTC) to avoid delays during periods of
# high loads of GitHub Actions workflow runs.
- cron: '17 3 * * *'
jobs:
setup:
runs-on: windows-latest
outputs:
chunks: ${{ steps.set-matrix.outputs.chunks }}
steps:
- uses: actions/checkout@v4
- name: Calculate package chunks
id: set-matrix
run: |
$chunks = python scripts/utils/split_packages.py
echo "chunks=$chunks" >> $env:GITHUB_OUTPUT
test:
needs: setup
runs-on: ${{ matrix.os }}
# Setting timeout parameter to 23 hours, but GitHub-hosted public runners seem to
# have a hard limit of 6 hours (360 mins) per job before being auto-aborted.
timeout-minutes: 1380
strategy:
fail-fast: false
# Removed max-parallel: 1 to allow true parallel execution.
# The wiki race condition is now handled by a separate publish job at the end.
matrix:
os: [windows-2022, windows-2025]
chunk: ${{ fromJson(needs.setup.outputs.chunks) }}
include:
- os: windows-2022
os_name: Win10
- os: windows-2025
os_name: Win11
steps:
- name: Checkout code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Build and test all packages
continue-on-error: true
env:
MATRIX_OS: ${{ matrix.os }}
run: scripts/test/test_install.ps1 -package_names "${{ matrix.chunk }}" -all -max_tries 3
- name: Upload logs to artifacts
uses: ./.github/actions/upload-logs
if: always()
with:
os: ${{ matrix.os }}-${{ strategy.job-index }}
- name: Upload results artifact
uses: actions/upload-artifact@v4
if: always()
with:
name: success_failure_${{ matrix.os_name }}_${{ strategy.job-index }}
path: success_failure.json
publish:
needs: test
runs-on: windows-latest
if: always() # Run even if tests fail
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Download all results
uses: actions/download-artifact@v4
with:
path: downloaded_artifacts
pattern: success_failure_*
- name: Checkout wiki code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
repository: ${{ github.repository }}.wiki
path: wiki
token: ${{ secrets.REPO_TOKEN }}
fetch-depth: 0
- name: Combine results and create Wiki entry
run: python scripts/utils/combine_results.py
- name: Commit changes to Wiki
working-directory: wiki
run: |
git config user.email 'vm-packages@google.com'
git config user.name 'vm-packages'
git commit -am 'Add daily results'
git push
- name: Get Win10 badge info
id: win10
run: |
if (Test-Path "success_failure_Win10.json") {
$json = Get-Content -Raw "success_failure_Win10.json" | ConvertFrom-Json
$message = "$($json.failure)/$($json.total)"
if (-not $json.failure) { $message += " 🎉" }
echo "failure=$($json.failure)" >> $env:GITHUB_OUTPUT
echo "message=$message" >> $env:GITHUB_OUTPUT
echo "has_results=true" >> $env:GITHUB_OUTPUT
}
- name: Update Win10 badge
if: steps.win10.outputs.has_results == 'true'
uses: schneegans/dynamic-badges-action@e9a478b16159b4d31420099ba146cdc50f134483 # v1.7.0
with:
auth: ${{ secrets.REPO_TOKEN }}
gistID: 7d6b2592948d916eb5529350308f01d1
filename: windows-2022_daily_badge.svg
label: "failures Win10"
message: "${{ steps.win10.outputs.message }}"
maxColorRange: 1.25
minColorRange: 0
invertColorRange: true
valColorRange: ${{ steps.win10.outputs.failure }}
- name: Get Win11 badge info
id: win11
run: |
if (Test-Path "success_failure_Win11.json") {
$json = Get-Content -Raw "success_failure_Win11.json" | ConvertFrom-Json
$message = "$($json.failure)/$($json.total)"
if (-not $json.failure) { $message += " 🎉" }
echo "failure=$($json.failure)" >> $env:GITHUB_OUTPUT
echo "message=$message" >> $env:GITHUB_OUTPUT
echo "has_results=true" >> $env:GITHUB_OUTPUT
}
- name: Update Win11 badge
if: steps.win11.outputs.has_results == 'true'
uses: schneegans/dynamic-badges-action@e9a478b16159b4d31420099ba146cdc50f134483 # v1.7.0
with:
auth: ${{ secrets.REPO_TOKEN }}
gistID: 7d6b2592948d916eb5529350308f01d1
filename: windows-2025_daily_badge.svg
label: "failures Win11"
message: "${{ steps.win11.outputs.message }}"
maxColorRange: 1.25
minColorRange: 0
invertColorRange: true
valColorRange: ${{ steps.win11.outputs.failure }}