Skip to content

Commit 6530e28

Browse files
committed
Add OSS tests
1 parent f612e57 commit 6530e28

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

.github/actions/start-promtail/action.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@ runs:
66
- name: Start Promtail container
77
shell: bash
88
run: |
9-
CONTAINER_NAME="promtail-${{ github.run_id }}-${{ matrix.container.image }}-${{ matrix.container.version }}"
109
docker run -d \
11-
--name="$CONTAINER_NAME" \
10+
--name="promtail" \
1211
-v "${{ github.workspace }}/test/dashboard/prep/promtail.yaml:/etc/promtail/config.yaml" \
1312
-v "${{ github.workspace }}/test/dashboard/logs:/var/log" \
1413
-e TEST_OUTDIR=test/dashboard/logs \

.github/workflows/ci.yml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -156,10 +156,6 @@ jobs:
156156
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
157157
with:
158158
go-version-file: 'go.mod'
159-
# - name: Clean Docker Environment
160-
# run: |
161-
# docker system prune -af --volumes
162-
# docker builder prune -af
163159
- name: Download Packages
164160
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
165161
with:
@@ -169,8 +165,8 @@ jobs:
169165
run: echo "START_TIME=$(date +"%Y-%m-%dT%H:%M:%S.%NZ")" >> ${GITHUB_ENV}
170166
- name: Create Directory
171167
run: mkdir -p ${{github.workspace}}/test/dashboard/logs/${{github.job}}/${{matrix.container.image}}${{matrix.container.version}}/
172-
# - name: Start Promtail
173-
# uses: ./.github/actions/start-promtail
168+
- name: Start Promtail
169+
uses: ./.github/actions/start-promtail
174170
- name: Run Integration Tests
175171
run: |
176172
go install github.com/goreleaser/nfpm/v2/cmd/nfpm@${{ env.NFPM_VERSION }}
@@ -227,11 +223,20 @@ jobs:
227223
with:
228224
name: nginx-agent-unsigned-snapshots
229225
path: build
226+
- name: Set Start Time
227+
run: echo "START_TIME=$(date +"%Y-%m-%dT%H:%M:%S.%NZ")" >> ${GITHUB_ENV}
228+
- name: Create Directory
229+
run: mkdir -p ${{github.workspace}}/test/dashboard/logs/${{github.job}}/${{matrix.container.image}}${{matrix.container.version}}/
230+
- name: Start Promtail
231+
uses: ./.github/actions/start-promtail
230232
- name: Run Integration Tests
231233
run: |
232234
go install github.com/goreleaser/nfpm/v2/cmd/nfpm@${{ env.NFPM_VERSION }}
233235
CONTAINER_NGINX_IMAGE_REGISTRY="${{ env.NGINX_OSS_REGISTRY }}" TAG="${{ matrix.container.version }}-${{ matrix.container.image }}" OS_RELEASE="${{ matrix.container.release }}"\
234-
make official-image-integration-test
236+
make official-image-integration-test | tee ${{github.workspace}}/test/dashboard/logs/${{github.job}}/${{matrix.container.image}}${{matrix.container.version}}/raw_logs.log && exit "${PIPESTATUS[0]}"
237+
- name: Generate Test Results
238+
if: always()
239+
run: bash ./scripts/workflow/generate_results.sh ${{job.status}} ${{env.START_TIME}} ${{github.job}}/${{matrix.container.image}}${{matrix.container.version}} ${{github.workspace}}
235240
- name: Container Output Logs
236241
if: failure()
237242
run: |

0 commit comments

Comments
 (0)