Skip to content

Commit

Permalink
Run basic tests on PR
Browse files Browse the repository at this point in the history
  • Loading branch information
pengrad committed Jan 22, 2024
1 parent fae2162 commit 1af8e47
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: PR Test

on:
workflow_dispatch:
pull_request:
branches: [ "master" ]

jobs:
GradlePRTest:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
cache: 'gradle'

- name: Gradle PR Test
run: ./gradlew clean prTest
22 changes: 22 additions & 0 deletions library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,28 @@ javadoc {
options.encoding = 'UTF-8'
}

test {
if (project.hasProperty('excludeTests')) {
exclude project.property('excludeTests')
}
}

tasks.withType(Test).configureEach {
testLogging {
events "started", "passed", "skipped", "failed"
}
}


tasks.register('prTest', Test) {
// TODO move "functional" tests into specific dir and exclude it
exclude '**/Base64Test.class'
exclude '**/CheckTelegramAuthTest.class'
exclude '**/PaymentsTest.class'
exclude '**/TelegramBotTest.class'
exclude '**/UpdatesListenerTest.class'
}

task fatJar(type: Jar) {
baseName = rootProject.name + '-full'
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
Expand Down

0 comments on commit 1af8e47

Please sign in to comment.