Run #123
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: Run | |
on: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
schedule: | |
# every Monday at 6am | |
- cron: '0 6 * * 1' | |
workflow_dispatch: | |
jobs: | |
collect: | |
strategy: | |
matrix: | |
max-age: [7, 30, 90] | |
# avoid conflicts when committing | |
max-parallel: 1 | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version-file: 'go.mod' | |
- name: Run script and save results to file | |
env: | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
run: | | |
d=$(date +"%Y_%m_%d") | |
out="results/$d" | |
mkdir -p "$out" | |
go run . -num-workers 5 -max-age ${{ matrix.max-age }} > "$out/results-${{ matrix.max-age }}.txt" | |
- uses: EndBug/add-and-commit@v9 | |
if: ${{ github.event_name == 'schedule' }} | |
with: | |
pull: "--rebase --autostash" | |
add: "results" | |
default_author: github_actions | |
message: "Weekly update for flaky tests (max-age: ${{ matrix.max-age }})" | |
- uses: EndBug/add-and-commit@v9 | |
if: ${{ github.event_name == 'workflow_dispatch'}} | |
with: | |
pull: "--rebase --autostash" | |
add: "results" | |
default_author: github_actions | |
message: "Manual update for flaky tests (max-age: ${{ matrix.max-age }})" |