Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: add xml reporting(experimental) #230

Merged
merged 1 commit into from
Nov 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 20 additions & 6 deletions .github/workflows/tests-integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ permissions:
id-token: write
contents: write
pull-requests: write
actions: write
checks: write

env:
TF_VAR_observe_url: ${{secrets.OBSERVE_URL}}
Expand All @@ -23,9 +25,8 @@ env:


jobs:

helm-charts-agent-integration-tests:
name: helm-charts-agent-integration-tests-${{ matrix.namespace }}-${{ matrix.values }}
name: ns-${{ matrix.namespace }}+values-${{ matrix.values }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand All @@ -41,7 +42,7 @@ jobs:
namespace: not-observe
defaults:
run:
working-directory: integration #Terrafrom commands and tests are ran from integration directory
working-directory: integration #Terraform commands and tests are ran from integration directory
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand All @@ -64,8 +65,8 @@ jobs:

- name: Setup Terraform
uses: hashicorp/setup-terraform@v3
with:
terraform_version: 1.9.5
with: #Use alpha version which has experimental Junit feature.
terraform_version: "1.10.0-alpha20240918"

- name: Terraform Init
id: init
Expand All @@ -78,4 +79,17 @@ jobs:
- name: Terraform Test
id: test
run: |
terraform test -verbose
terraform test -verbose -junit-xml=results-ns-${{ matrix.namespace }}+values-${{ matrix.values }}.xml

- name: Upload Test Results
uses: actions/upload-artifact@v4
if: success() || failure()
with:
name: results-ns-${{ matrix.namespace }}+values-${{ matrix.values }}
path: ${{ github.workspace }}/integration/*.xml

- name: Publish Test Summary #Parses *xml file and sends summary to Github Summary Page.
uses: test-summary/action@v2
with:
paths: ${{ github.workspace }}/integration/*.xml
if: always()
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ terraform.tfvars
tfplan
.terraform.lock.hcl
*_override.tf
*.xml

#python
venv
Expand Down
Loading