Skip to content

ARM and Bicep E2E Tests #2

ARM and Bicep E2E Tests

ARM and Bicep E2E Tests #2

name: ARM and Bicep E2E Tests
on:
workflow_dispatch:
jobs:
e2e-arm-bicep:
runs-on: ubuntu-latest
env:
MPF_SUBSCRIPTIONID: ${{ secrets.MPF_SUBSCRIPTIONID }}
MPF_TENANTID: ${{ secrets.MPF_TENANTID }}
MPF_SPCLIENTID: ${{ secrets.MPF_SPCLIENTID }}
MPF_SPCLIENTSECRET: ${{ secrets.MPF_SPCLIENTSECRET }}
MPF_SPOBJECTID: ${{ secrets.MPF_SPOBJECTID }}
strategy:
matrix:
go-version: [ '1.19' ]
steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: Install dependencies
run: go get ./...
- name: Build
run: go build -v ./...
- name: Install Bicep
run: |
curl -Lo bicep https://github.com/Azure/bicep/releases/latest/download/bicep-linux-x64
chmod +x ./bicep
sudo mv ./bicep /usr/local/bin/bicep
bicep --help
- name: Test with Go
run: |
cd e2eTests
export MPF_BICEPEXECPATH=/usr/local/bin/bicep
go install github.com/jstemmer/go-junit-report@latest
go test . -v -run TestARM TestBicep | go-junit-report -set-exit-code > TestResults-${{ matrix.go-version }}.xml
- name: Upload Go test results
uses: actions/upload-artifact@v4
with:
name: Go-results-${{ matrix.go-version }}
path: TestResults-${{ matrix.go-version }}.xml
- name: Test Summary
uses: test-summary/action@v1
with:
paths: |
TestResults-${{ matrix.go-version }}.xml
if: always()