forked from isaacphysics/isaac-api
-
Notifications
You must be signed in to change notification settings - Fork 1
45 lines (42 loc) · 1.45 KB
/
test.yml
File metadata and controls
45 lines (42 loc) · 1.45 KB
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
name: Test
on:
push:
branches: [main]
pull_request:
jobs:
build-and-test:
name: Build & Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: 17
distribution: temurin
- uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Fetch ES data
run: wget -O src/test/resources/isaac-test-es-data.tar.gz https://cdn.isaaccomputerscience.org/isaac/test/isaac-test-es-data.tar.gz
- name: Build with Maven
run: mvn -B package -DskipTests --file pom.xml
- name: Test with Maven
run: mvn -B verify --file pom.xml
- name: Add coverage to PR
if: github.actor != 'dependabot[bot]'
id: jacoco
uses: madrapps/jacoco-report@v1.6.1
with:
paths: ${{ github.workspace }}/**/target/site/jacoco-merged-test-coverage-report/jacoco.xml
token: ${{ secrets.GITHUB_TOKEN }}
min-coverage-overall: 80
min-coverage-changed-files: 80
title: Coverage Report # A title is required for update-comment to work correctly
update-comment: true
pass-emoji: ':white_check_mark:'
fail-emoji: ':x:'
continue-on-error: true # The repository is currently far below the threshold, so we can't enforce this for now