-
Notifications
You must be signed in to change notification settings - Fork 2
118 lines (99 loc) · 4.08 KB
/
os-extension-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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
name: Build and Test Extension
on:
workflow_dispatch:
pull_request:
types:
- opened
- reopened
- synchronize
jobs:
build:
name: Build & Package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 17
distribution: 'temurin'
cache: 'maven'
- name: Build and Package
run: mvn --file liquibase-couchbase/pom.xml -B dependency:go-offline clean package -DskipTests=true
- name: Get Artifact ID
id: get-artifact-id
run: echo "::set-output name=artifact_id::$(mvn --file liquibase-couchbase/pom.xml help:evaluate -Dexpression=project.artifactId -q -DforceStdout)"
- name: Save Artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ steps.get-artifact-id.outputs.artifact_id }}-artifacts
path: liquibase-couchbase/target/*
- name: Save Event File
uses: actions/upload-artifact@v3
with:
name: Event File
path: ${{ github.event_path }}
outputs:
artifact_id: ${{ steps.get-artifact-id.outputs.artifact_id }}
unit-and-it-test-ubuntu:
strategy:
fail-fast: false
matrix:
java: [ 8, 11, 17, 18 ]
os: [ ubuntu-latest ]
name: Test Java ${{ matrix.java }} - ${{ matrix.os }}
runs-on: ${{ matrix.os }}
needs: build
steps:
- uses: actions/checkout@v3
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java }}
distribution: 'temurin'
cache: 'maven'
- uses: actions/download-artifact@v3
with:
name: ${{needs.build.outputs.artifact_id}}-artifacts
path: liquibase-couchbase/target
- name: Run Tests
run: mvn --file liquibase-couchbase/pom.xml -B org.jacoco:jacoco-maven-plugin:0.8.8:prepare-agent verify org.jacoco:jacoco-maven-plugin:0.8.8:report "-Dskip.integration.tests=false"
- name: Archive Test Results - ${{ matrix.os }}
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: test-reports-jdk-${{ matrix.java }}-${{ matrix.os }}
path: |
**/target/surefire-reports
**/target/jacoco.exec
unit-test-windows:
strategy:
fail-fast: false
matrix:
java: [ 8, 11, 17, 18 ]
os: [ windows-latest ]
name: Test Java ${{ matrix.java }} - ${{ matrix.os }}
runs-on: ${{ matrix.os }}
needs: build
steps:
- uses: actions/checkout@v3
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java }}
distribution: 'temurin'
cache: 'maven'
- uses: actions/download-artifact@v3
with:
name: ${{needs.build.outputs.artifact_id}}-artifacts
path: liquibase-couchbase/target
- name: Run Tests
run: mvn --file liquibase-couchbase/pom.xml -B org.jacoco:jacoco-maven-plugin:0.8.8:prepare-agent verify org.jacoco:jacoco-maven-plugin:0.8.8:report "-Dskip.integration.tests=true"
- name: Archive Test Results - ${{ matrix.os }}
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: test-reports-jdk-${{ matrix.java }}-${{ matrix.os }}
path: |
**/target/surefire-reports
**/target/jacoco.exec