-
Notifications
You must be signed in to change notification settings - Fork 15
47 lines (42 loc) · 1.28 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
name: Test
on:
push:
# Triggers the workflow on labeled PRs only.
pull_request_target:
types: [ labeled ]
jobs:
test:
if: github.event_name == 'push' || (github.event_name == 'pull_request_target' && contains(github.event.pull_request.labels.*.name, 'safe to test'))
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, windows-latest, macOS-latest ]
steps:
- uses: actions/checkout@v3
with:
submodules: true
ref: ${{ github.event.pull_request.head.sha }}
# Install required tools
- name: Set up Java
uses: actions/setup-java@v3
with:
distribution: "temurin"
java-version: "11"
- name: Setup Artifactory
env:
RTLIC: ${{ secrets.RTLIC }}
GOPROXY: direct
run: |
go install github.com/jfrog/jfrog-testing-infra/local-rt-setup@latest
~/go/bin/local-rt-setup
# Run tests
- name: Tests on macOS, Linux
run: ./gradlew clean validatePlugins check
if: runner.os != 'Windows'
- name: Tests on Windows
run: ./gradlew.bat clean check
if: runner.os == 'Windows'
# Stop Gradle daemon
- name: Stop Gradle
run: ./gradlew --stop