-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (48 loc) · 1.39 KB
/
test.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
name: "Test"
on:
push:
branches:
- '**'
tags-ignore:
- '**'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ github.ref }}
cancel-in-progress: true
jobs:
unit-test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, windows-latest, macOS-latest ]
branch: [main] # Adjust branches/tags as needed
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: "corretto"
java-version: "19"
- name: SetUp ois-core
run: |
git clone --branch ${{ matrix.branch }} https://github.com/attiasas/ois-core.git
cd ois-core
if [[ "${{ matrix.os }}" == "windows-latest" ]]; then
./gradlew.bat publishToMavenLocal
else
chmod +x gradlew
./gradlew publishToMavenLocal
fi
cd .. # Return to the main project working directory
shell: bash
# Run tests
- name: Tests on macOS, Linux
run: |
chmod +x gradlew
./gradlew clean check
if: runner.os != 'Windows'
- name: Tests on Windows
run: ./gradlew.bat clean check
if: runner.os == 'Windows'