-
Notifications
You must be signed in to change notification settings - Fork 49
134 lines (117 loc) · 3.59 KB
/
integration-yaml-tests.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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
name: YAML Tests
on:
push:
branches-ignore:
- 'dependabot/**'
pull_request: {}
jobs:
test-yaml:
name: YAML Tests (Released OpenSearch)
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
version: [ '1.2.4', '1.3.11', '2.2.0', '2.4.0', '2.6.0', '2.8.0', '2.9.0' ]
steps:
- name: Checkout Client
uses: actions/checkout@v3
with:
path: client
- uses: actions/setup-dotnet@v3
with:
dotnet-version: |
5.0.x
6.0.x
- uses: actions/cache@v3
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.?sproj') }}
restore-keys: |
${{ runner.os }}-nuget-
- name: Run OpenSearch
id: opensearch
uses: ./client/.github/actions/run-released-opensearch
with:
version: ${{ matrix.version }}
secured: true
- name: Run YAML tests
working-directory: client
run: |
dotnet run \
--project ./tests/Tests.YamlRunner/Tests.YamlRunner.fsproj \
-- \
--endpoint $OPENSEARCH_URL \
--auth-cert ./.ci/certs/kirk.p12 \
--auth-cert-pass kirk \
--junit-output-file ./test-results.xml
env:
OPENSEARCH_URL: ${{ steps.opensearch.outputs.opensearch_url }}
- name: Save OpenSearch logs
if: failure()
uses: actions/upload-artifact@v3
with:
name: opensearch-logs-${{ matrix.version }}
path: |
opensearch-*/logs/*
- name: Upload test report
if: failure()
uses: actions/upload-artifact@v3
with:
name: report-yaml-${{ matrix.version }}
path: client/test-results.xml
test-yaml-unreleased:
name: YAML Tests (Unreleased OpenSearch)
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
opensearch_ref: ['1.x', '2.x', 'main']
steps:
- name: Checkout Client
uses: actions/checkout@v3
with:
path: client
- uses: actions/setup-dotnet@v3
with:
dotnet-version: |
5.0.x
6.0.x
- uses: actions/cache@v3
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.?sproj') }}
restore-keys: |
${{ runner.os }}-nuget-
- name: Restore or Build OpenSearch
id: opensearch_build
uses: ./client/.github/actions/build-opensearch
with:
ref: ${{ matrix.opensearch_ref }}
- name: Unpack OpenSearch
run: tar -xzf ${{ steps.opensearch_build.outputs.distribution }}
- name: Start OpenSearch
id: opensearch
uses: ./client/.github/actions/start-opensearch
- name: Run YAML tests
working-directory: client
run: |
dotnet run \
--project ./tests/Tests.YamlRunner/Tests.YamlRunner.fsproj \
-- \
--endpoint $OPENSEARCH_URL \
--junit-output-file ./test-results.xml
env:
OPENSEARCH_URL: ${{ steps.opensearch.outputs.opensearch_url }}
- name: Save OpenSearch logs
if: failure()
uses: actions/upload-artifact@v3
with:
name: opensearch-logs-${{ matrix.opensearch_ref }}
path: |
opensearch-*/logs/*
- name: Upload test report
if: failure()
uses: actions/upload-artifact@v3
with:
name: report-yaml-unreleased-${{ matrix.opensearch_ref }}
path: client/test-results.xml