-
Notifications
You must be signed in to change notification settings - Fork 0
100 lines (88 loc) · 3.65 KB
/
Copy pathci.yml
File metadata and controls
100 lines (88 loc) · 3.65 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
# https://github.com/vergil-project/vergil-actions/blob/develop/.github/workflows/README.md
name: CI
on:
pull_request:
workflow_call:
inputs:
ruby-versions:
type: string
default: '["3.2", "3.3", "3.4"]'
integration-matrix:
type: string
default: '[{"ruby-version":"3.2","project-suffix":"3-2","qm1-rest-port":"9475","qm2-rest-port":"9476","qm1-mq-port":"1446","qm2-mq-port":"1447"},{"ruby-version":"3.3","project-suffix":"3-3","qm1-rest-port":"9477","qm2-rest-port":"9478","qm1-mq-port":"1448","qm2-mq-port":"1449"},{"ruby-version":"3.4","project-suffix":"3-4","qm1-rest-port":"9479","qm2-rest-port":"9480","qm1-mq-port":"1450","qm2-mq-port":"1451"}]'
run-security:
type: string
default: 'true'
run-release:
type: string
default: 'true'
permissions:
contents: read
actions: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
audit:
uses: vergil-project/vergil-actions/.github/workflows/ci-audit.yml@v2.1
with:
language: ruby
versions: ${{ inputs.ruby-versions || '["3.2", "3.3", "3.4"]' }}
container-suffix: ruby
integration-tests:
name: "test / integration / ${{ matrix.ruby-version }}"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include: ${{ fromJSON(inputs.integration-matrix || '[{"ruby-version":"3.2","project-suffix":"3-2","qm1-rest-port":"9475","qm2-rest-port":"9476","qm1-mq-port":"1446","qm2-mq-port":"1447"},{"ruby-version":"3.3","project-suffix":"3-3","qm1-rest-port":"9477","qm2-rest-port":"9478","qm1-mq-port":"1448","qm2-mq-port":"1449"},{"ruby-version":"3.4","project-suffix":"3-4","qm1-rest-port":"9479","qm2-rest-port":"9480","qm1-mq-port":"1450","qm2-mq-port":"1451"}]') }}
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true
- name: Setup MQ environment
uses: mq-rest-admin-project/mq-rest-admin-dev-environment/.github/actions/setup-mq@main
with:
project-name: mqrest-ruby-${{ matrix.project-suffix }}
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_BASE_URL: https://localhost:${{ matrix.qm1-rest-port }}/ibmmq/rest/v2
MQ_REST_BASE_URL_QM2: https://localhost:${{ matrix.qm2-rest-port }}/ibmmq/rest/v2
run: |
MQ_REST_ADMIN_RUN_INTEGRATION=1 \
MQ_SKIP_LIFECYCLE=1 \
bundle exec rake integration
quality:
uses: vergil-project/vergil-actions/.github/workflows/ci-quality.yml@v2.1
with:
language: ruby
versions: ${{ inputs.ruby-versions || '["3.2", "3.3", "3.4"]' }}
security:
uses: vergil-project/vergil-actions/.github/workflows/ci-security.yml@v2.1
with:
language: ruby
run-standards: ${{ inputs.run-release != 'false' }}
run-security: ${{ inputs.run-security != 'false' }}
permissions:
contents: read
security-events: write
actions: read
test:
uses: vergil-project/vergil-actions/.github/workflows/ci-test.yml@v2.1
with:
language: ruby
versions: ${{ inputs.ruby-versions || '["3.2", "3.3", "3.4"]' }}
container-suffix: ruby
version:
uses: vergil-project/vergil-actions/.github/workflows/ci-version-bump.yml@v2.1
with:
language: ruby
run-release: ${{ inputs.run-release != 'false' }}