This repository has been archived by the owner on Jul 18, 2024. It is now read-only.
forked from candlepin/candlepin
-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (52 loc) · 1.59 KB
/
unit_tests.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
---
name: Unit tests
on:
pull_request:
workflow_dispatch:
# Cancel in-progress PR verification workflows. We only care about verifying the latest commit.
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
unit_tests:
name: unit tests
runs-on: ubuntu-latest
container:
image: fedora:38
steps:
- name: Install dependencies
shell: bash
run: dnf --setopt install_weak_deps=False install -y gettext git-core
- name: Check out repository
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- name: Rebase
uses: ./.github/actions/rebase
- name: Set Environment Variables
uses: ./.github/actions/set_vars
with:
varFilePath: ./.github/variables/pr_verification.env
- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: ${{ env.JAVA_DISTRIBUTION }}
java-version: ${{ env.JAVA_VERSION }}
- name: Run unit tests
uses: gradle/gradle-build-action@v3
with:
arguments: test coverage
- name: Save PR number to file
run: echo ${{ github.event.number }} > PR_NUMBER.txt
- name: Archive PR number
uses: actions/upload-artifact@v4
with:
name: pr_number
path: PR_NUMBER.txt
- name: Archive reports
uses: actions/upload-artifact@v4
with:
name: unit_test_reports
path: |
**/build/**/jacoco*.xml