-
Notifications
You must be signed in to change notification settings - Fork 26
49 lines (49 loc) · 1.49 KB
/
check.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: Check
on: [ pull_request, push ]
jobs:
check:
runs-on: ubuntu-latest
# push: always run.
# pull_request: run only when the PR is submitted from a forked repository, not within this repository.
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Set up OpenJDK 8
uses: actions/setup-java@v4
with:
java-version: 8
distribution: "temurin"
cache: "gradle"
- name: Run elastisearch container
run: docker-compose up -d
- name: List containers
run: docker-compose ps
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Testing
run: ./gradlew check --console rich --info
- name: Check building
run: ./gradlew gem --console rich --info
- name: JaCoCo test report
if: success()
run: ./gradlew jacocoTestReport
- name: Pack reports
if: always()
run: zip -9 -r -q reports.zip ./build/reports
- uses: actions/upload-artifact@v4
if: success()
with:
name: reports
path: ./reports.zip
- uses: actions/upload-artifact@v4
if: success()
with:
name: gem
path: ./pkg/*.gem
- uses: actions/upload-artifact@v4
if: success()
with:
name: jar
path: ./build/libs/*.jar