-
-
Notifications
You must be signed in to change notification settings - Fork 678
70 lines (67 loc) · 2.06 KB
/
build.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
64
65
66
67
68
69
70
name: build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
env:
DISPLAY: :99
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
jobs:
build:
strategy:
matrix:
os: [ ubuntu-latest, windows-latest, macos-13 ]
java: [ 17 ]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout GitHub repo
uses: actions/checkout@v4
- name: Set up Java
uses: actions/[email protected]
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
cache: 'maven'
- name: Start Xvfb
if: matrix.os == 'ubuntu-latest'
run: Xvfb $DISPLAY &
- name: Run tests on Linux
if: matrix.os == 'ubuntu-latest'
uses: nick-fields/[email protected]
with:
timeout_minutes: 30
max_attempts: 3
command: mvn -B test -Dtest=!Record*
- name: Run tests on Mac
if: matrix.os == 'macos-13'
uses: nick-fields/[email protected]
with:
timeout_minutes: 30
max_attempts: 3
command: mvn -B test -Dtest=!Docker*,!Record*
- name: Run tests on Windows
if: matrix.os == 'windows-latest'
uses: nick-fields/[email protected]
with:
timeout_minutes: 30
max_attempts: 3
command: mvn -B test -Dtest=!Docker*
- name: Upload analysis to SonarCloud
if: success() && matrix.os == 'ubuntu-latest' && matrix.java == '17' && !contains(github.ref, 'pull')
run: >
mvn -B sonar:sonar
-Dsonar.host.url=https://sonarcloud.io
-Dsonar.organization=bonigarcia-github
-Dsonar.projectKey=io.github.bonigarcia:webdrivermanager
- name: Upload coverage to Codecov
if: success() && matrix.os == 'ubuntu-latest' && matrix.java == '17' && !contains(github.ref, 'pull')
uses: codecov/[email protected]
- name: Store recordings (only available in Windows)
if: always() && matrix.os == 'windows-latest'
uses: actions/[email protected]
with:
name: webm-files
path: |
C:\Users\runneradmin\Downloads\*.webm