-
Notifications
You must be signed in to change notification settings - Fork 64
71 lines (69 loc) · 2.66 KB
/
daily.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: Daily Test
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:
test:
runs-on: ${{ matrix.os }}
# Testing all packages takes several hours
timeout-minutes: 1380
strategy:
fail-fast: false
# Updating the wiki fails if between the checkout of the wiki and the push of the update the other job pushes its update
max-parallel: 1
matrix:
os: [windows-2019, windows-2022]
include:
- os: windows-2022
os_name: Win22
- os: windows-2019
os_name: Win19
steps:
- name: Checkout code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Build and test all packages
continue-on-error: true
run: scripts/test/test_install.ps1 -all -max_tries 3
- name: Upload logs to artifacts
uses: ./.github/actions/upload-logs
- name: Checkout wiki code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
repository: ${{ github.repository }}.wiki
path: wiki
- name: Add results to wiki
run: python scripts/utils/generate_daily_results.py ${{ github.repository }} ${{ github.sha }} ${{ github.run_number }} ${{ github.run_id }} ${{ matrix.os }}
- name: Commit changes
working-directory: wiki
run: |
git config user.email '[email protected]'
git config user.name 'vm-packages'
git commit -am 'Add daily results'
git push
- name: Get badge info
run: |
pwd
$json = Get-Content -Raw "success_failure.json" | ConvertFrom-Json
$failure = $json.failure
$total = $json.total
$message = "$failure/$total"
# Celebrate that there are not failures
if (-not $failure) { $message += " 🎉" }
echo "failure=$failure" >> $env:GITHUB_ENV
echo "message=$message" >> $env:GITHUB_ENV
- name: Update dynamic badge gist
uses: schneegans/dynamic-badges-action@e9a478b16159b4d31420099ba146cdc50f134483 # v1.7.0
with:
auth: ${{ secrets.REPO_TOKEN }}
gistID: 7d6b2592948d916eb5529350308f01d1
filename: ${{ matrix.os }}_daily_badge.svg
label: "failures ${{ matrix.os_name }}"
message: "${{ env.message }}"
# Use orange if only 1 package fails and red if more than 1 fail
maxColorRange: 1.25
minColorRange: 0
invertColorRange: true
valColorRange: ${{ env.failure }}