Issue#4 CI Jobs to run tests on schedule and on Pull Requests
This commit is contained in:
parent
1a75c3619c
commit
fb5f07d54a
3 changed files with 68 additions and 2 deletions
33
.github/workflows/pull-request-jobs.yml
vendored
Normal file
33
.github/workflows/pull-request-jobs.yml
vendored
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
name: Verify Pull request is fine
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- develop
|
||||
|
||||
env:
|
||||
GITHUB_USERNAME: "fknives"
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
jobs:
|
||||
run-tests:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
- name: Setup Java
|
||||
uses: actions/setup-java@v2
|
||||
with:
|
||||
distribution: 'adopt'
|
||||
java-version: '11'
|
||||
- name: Run Unit Tests
|
||||
run: ./gradlew :app:testDebugUnitTest --tests "org.fnives.tiktokdownloader.*"
|
||||
- name: Upload Test Results
|
||||
uses: actions/upload-artifact@v2
|
||||
if: always()
|
||||
with:
|
||||
name: Test Results
|
||||
path: ./**/build/reports/tests/**/index.html
|
||||
retention-days: 1
|
||||
32
.github/workflows/up-to-date-jobs.yml
vendored
Normal file
32
.github/workflows/up-to-date-jobs.yml
vendored
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
name: Verify Download Method still works
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 20 21 * *'
|
||||
|
||||
env:
|
||||
GITHUB_USERNAME: "fknives"
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
jobs:
|
||||
run-up-to-date-tests:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
- name: Setup Java
|
||||
uses: actions/setup-java@v2
|
||||
with:
|
||||
distribution: 'adopt'
|
||||
java-version: '11'
|
||||
- name: Run Up-To-Date Tests
|
||||
run: ./gradlew :app:testDebugUnitTest --tests "org.fnives.uptodate.*"
|
||||
- name: Upload Test Results
|
||||
uses: actions/upload-artifact@v2
|
||||
if: always()
|
||||
with:
|
||||
name: Test Results
|
||||
path: ./**/build/reports/tests/**/index.html
|
||||
retention-days: 1
|
||||
Loading…
Add table
Add a link
Reference in a new issue