-
Notifications
You must be signed in to change notification settings - Fork 0
113 lines (101 loc) · 3.56 KB
/
Copy pathci.yml
File metadata and controls
113 lines (101 loc) · 3.56 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
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
# https://github.com/vergil-project/vergil-actions/blob/develop/.github/workflows/README.md
name: CI
on:
pull_request:
workflow_call:
inputs:
java-versions:
description: >-
JSON array of Java versions for the unit-test matrix.
Default (empty) runs the full matrix: ["17", "21"].
type: string
default: ""
integration-matrix:
description: >-
JSON array of objects for the integration-test matrix.
Default (empty) runs the full matrix with per-version ports.
type: string
default: ""
run-security:
type: boolean
default: true
run-release:
type: boolean
default: true
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
audit:
uses: vergil-project/vergil-actions/.github/workflows/ci-audit.yml@v2.0
with:
language: java
versions: ${{ inputs.java-versions || '["17", "21"]' }}
container-suffix: java
integration-tests:
name: "test / integration / ${{ matrix.java-version }}"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include: >-
${{ fromJSON(inputs.integration-matrix || '[
{"java-version":"17","qm1-rest-port":"9453","qm2-rest-port":"9454","qm1-mq-port":"1426","qm2-mq-port":"1427"},
{"java-version":"21","qm1-rest-port":"9455","qm2-rest-port":"9456","qm1-mq-port":"1428","qm2-mq-port":"1429"}
]') }}
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Set up Java ${{ matrix.java-version }}
uses: actions/setup-java@v5
with:
distribution: temurin
java-version: ${{ matrix.java-version }}
cache: maven
- name: Setup MQ environment
# yamllint disable-line rule:line-length
uses: mq-rest-admin-project/mq-rest-admin-dev-environment/.github/actions/setup-mq@main
with:
project-name: mqrest-java-${{ matrix.java-version }}
qm1-rest-port: ${{ matrix.qm1-rest-port }}
qm2-rest-port: ${{ matrix.qm2-rest-port }}
qm1-mq-port: ${{ matrix.qm1-mq-port }}
qm2-mq-port: ${{ matrix.qm2-mq-port }}
- name: Run integration tests
env:
MQ_REST_ADMIN_RUN_INTEGRATION: "1"
MQ_SKIP_LIFECYCLE: "1"
# yamllint disable-line rule:line-length
MQ_REST_BASE_URL: >-
https://localhost:${{ matrix.qm1-rest-port }}/ibmmq/rest/v2
# yamllint disable-line rule:line-length
MQ_REST_BASE_URL_QM2: >-
https://localhost:${{ matrix.qm2-rest-port }}/ibmmq/rest/v2
run: ./mvnw verify -B
quality:
uses: vergil-project/vergil-actions/.github/workflows/ci-quality.yml@v2.0
with:
language: java
versions: ${{ inputs.java-versions || '["17", "21"]' }}
security:
uses: vergil-project/vergil-actions/.github/workflows/ci-security.yml@v2.0
with:
language: java
run-standards: ${{ inputs.run-release != 'false' }}
run-security: ${{ inputs.run-security != 'false' }}
permissions:
contents: read
security-events: write
test:
uses: vergil-project/vergil-actions/.github/workflows/ci-test.yml@v2.0
with:
language: java
versions: ${{ inputs.java-versions || '["17", "21"]' }}
container-suffix: java
version:
uses: vergil-project/vergil-actions/.github/workflows/ci-version-bump.yml@v2.0
with:
language: java
run-release: ${{ inputs.run-release != 'false' }}