Skip to content

Commit

Permalink
Implement cron job for full suite IT
Browse files Browse the repository at this point in the history
  • Loading branch information
pawelpasterz committed Nov 25, 2020
1 parent 3075194 commit 06f2e57
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/it_failed_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
name: Full suite IT test report
about: Report failed IT tests
title: Full Suite integration tests failed on master [{{ env.RUN_DATE }}]
labels: bug
---
### Integration Test failed on master
**Timestamp:** {{ env.RUN_DATE }}
**Buildscan url for [{{ env.RUN_ID }}](https://github.com/pawelpasterz/flank/actions/runs/{{ env.RUN_ID }})**
{{ env.BUILD_SCAN_URL }}
53 changes: 53 additions & 0 deletions .github/workflows/full_suite_integration_tests_cron.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Full Suite Integration Tests Cron

on:
schedule:
- cron: '0 0 * * *' # At 00:00 everyday
workflow_dispatch: # or manually

jobs:
run_it_full_suite:
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: '${{ secrets.GITHUB_TOKEN }}'

- name: Checkout code
uses: actions/checkout@v2
with:
submodules: true

- uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ubuntu-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
ubuntu-gradle-
- name: Get current time
uses: 1466587594/get-current-time@v2
id: current-time
with:
format: 'YYYY-MM-DD HH:mm'
utcOffset: "+00:00"

- name: Gradle clean build
uses: eskatos/gradle-command-action@v1
id: build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HEAD_REF: ${{ github.ref }}
with:
arguments: "clean integrationTests"

- uses: JasonEtco/create-an-issue@v2
if: failure()
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RUN_DATE: ${{ steps.current-time.outputs.formattedTime }}
RUN_ID: ${{ github.run_id }}
BUILD_SCAN_URL: ${{ steps.build.outputs.build-scan-url }}
with:
filename: .github/it_failed_template.md

0 comments on commit 06f2e57

Please sign in to comment.