Skip to content

Daily Race Detector Tests #307

Daily Race Detector Tests

Daily Race Detector Tests #307

Workflow file for this run

name: Daily Race Detector Tests
on:
schedule:
# Run at 02:00 UTC every day
- cron: '0 2 * * *'
workflow_dispatch: # Allow manual triggering
permissions:
contents: read
jobs:
race-test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.24.2' # Adjust as needed for your project
cache: true
- name: Run tests with race detector
run: go test -race ./...
- name: Notify if tests failed
if: failure()
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
github.rest.issues.create({
owner: context.repo.owner,
repo: context.repo.repo,
title: 'Daily race tests failed',
body: 'Daily race detector tests failed on ' + new Date().toISOString() + '\nSee: ' + process.env.GITHUB_SERVER_URL + '/' + process.env.GITHUB_REPOSITORY + '/actions/runs/' + process.env.GITHUB_RUN_ID
})