Skip to content

Commit

Permalink
inits auto-gen of results
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Hausenblas <hausenbl@amazon.com>

See prometheus#30
  • Loading branch information
mhausenblas authored Jun 2, 2021
1 parent e6fa704 commit 7196ab1
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/generate-results.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Cron job for generating test results
on:
schedule:
- cron: '42 12 * * *' # run the job once a day
workflow_dispatch: # enable manual trigger for dev and test
jobs:
remote_write:
name: Generate compliance results for remote_write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: "Check out repo and update results"
run: |
THISRUN=$(date +%s)
git clone https://github.com/prometheus/compliance.git $GITHUB_WORKSPACE/documents/compliance
go test --tags=compliance -v $GITHUB_WORKSPACE/documents/compliance/remote_write > $GITHUB_WORKSPACE/results/$THISRUN_remote_write
git config --global user.name "GitHub Actions"
git config --global user.email "noreply@github.com"
git add $THISRUN_results
if [ ! $(git status --porcelain | tee /dev/fd/2 | wc -c) -eq 0 ]; then
git commit -m "auto-generated results for remote_write on $THISRUN"
git push
fi
echo DONE generating remote_write results

0 comments on commit 7196ab1

Please sign in to comment.