-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (60 loc) · 2.16 KB
/
build.yml
File metadata and controls
71 lines (60 loc) · 2.16 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: Build And Upload
on:
push:
tags:
- "*"
jobs:
test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
include:
- os: ubuntu-latest
test-type: integration
- os: macos-latest
test-type: unit
- os: windows-latest
test-type: unit
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'temurin'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
if: matrix.os != 'windows-latest'
- name: Run unit tests
if: matrix.test-type == 'unit'
run: ./gradlew test --tests "io.github.intisy.docker.ModelTest" --tests "io.github.intisy.docker.DockerClientBuilderTest" --info
shell: bash
- name: Run tests (Linux - excluding daemon startup tests)
if: matrix.test-type == 'integration'
run: ./gradlew test --tests "io.github.intisy.docker.ModelTest" --tests "io.github.intisy.docker.DockerClientBuilderTest" --tests "io.github.intisy.docker.WslDiagnosticTest" --info
shell: bash
build:
needs: test
runs-on: ubuntu-latest
steps:
- name: Checkout project sources
uses: actions/checkout@v4
- name: Set up JDK 8
uses: actions/setup-java@v4
with:
java-version: '8'
distribution: 'temurin'
- name: Setup Git
run: echo ${{ secrets.PAT }} | gh auth login --with-token
- name: Setup Gradle
uses: gradle/gradle-build-action@v3
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Run build with Gradle Wrapper (skip tests - already run in test job)
run: ./gradlew build -x test -Partifact_version=${{ github.ref_name }}
- name: Create Release and Upload Jar
run: |
gh release create ${{ github.ref_name }} -t "Release ${{ github.ref_name }}"
gh release upload "${{ github.ref_name }}" build/libs/* --clobber