Skip to content

Commit

Permalink
ci: add xml reporting(experimental)
Browse files Browse the repository at this point in the history
  • Loading branch information
obs-gh-nikhildua committed Nov 6, 2024
1 parent ebb76d3 commit a22ab4a
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 6 deletions.
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

0 comments on commit a22ab4a

Please sign in to comment.