-
Notifications
You must be signed in to change notification settings - Fork 1
49 lines (48 loc) · 1.41 KB
/
ci.yml
File metadata and controls
49 lines (48 loc) · 1.41 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
46
47
48
49
# Runs the tests & tasks on push (if not disabled)
name: 🏗️ CI
on:
workflow_dispatch:
push:
paths:
- 'src/**' # only if src files where modified
jobs:
build:
runs-on: ubuntu-latest
env:
RESULTS_MD_FILE: target/results.md
steps:
- uses: actions/checkout@v2
- name: ☕ Set up JDK 17
uses: actions/setup-java@v2
with:
java-version: 17
distribution: adopt
cache: maven
- name: 🧪 Maven Test
run: mvn -B test
- name: 🖍️ Publish Test Report
uses: mikepenz/action-junit-report@v2
if: always()
with:
report_paths: >
**/surefire-reports/TEST-*.xml
- name: read report
id: read_report
if: always()
run: >
echo "::set-output name=content::$(awk '{printf "%s\\n", $0}' "${RESULTS_MD_FILE}")"
- uses: octokit/request-action@v2.x
name: ⭐ Publish Puzzle Results
if: always()
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
route: POST /repos/{owner}/{repo}/check-runs
owner: ${{ github.repository_owner }}
repo: AdventOfCode2021
name: "⭐ Puzzle Results"
head_sha: ${{ github.sha }}
conclusion: success
output: |
title: "⭐ Puzzle Results"
summary: "${{ steps.read_report.outputs.content }}"