Skip to content

Commit

Permalink
Build - test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Duzhinsky committed Aug 31, 2023
1 parent fa6bc98 commit 2f7e88c
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: build

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Java
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17
- name: Run build
run: ./gradlew clean build -x test

test:
name: Unit tests
runs-on: ubuntu-latest
needs: [ build ]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Java
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17
- name: Run build
run: ./gradlew test --build-cache --no-daemon
- name: Upload test report in case of failures
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: unit-test-report
path: build/reports/tests/unit-test/
retention-days: 3
Empty file modified gradlew
100644 → 100755
Empty file.
11 changes: 11 additions & 0 deletions javapoet/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
tasks.withType<JavaCompile>() {
options.encoding = "UTF-8"
}

dependencies {
testImplementation("com.google.truth:truth:1.1.5")
testImplementation("com.google.testing.compile:compile-testing:0.21.0")
testImplementation("com.google.jimfs:jimfs:1.3.0")
testImplementation("org.mockito:mockito-core:4.11.0")
testImplementation("org.eclipse.jdt.core.compiler:ecj:4.6.1")
}

0 comments on commit 2f7e88c

Please sign in to comment.