fix: add inline actions and conditions to monitor v2 data source to support exporting #688
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: test | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
jobs: | |
acceptance: | |
runs-on: ubuntu-latest | |
concurrency: | |
group: tests-${{ github.ref }} | |
timeout-minutes: 60 | |
permissions: | |
# https://github.com/EnricoMi/publish-unit-test-result-action#permissions | |
contents: read | |
issues: read | |
checks: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version-file: go.mod | |
- uses: hashicorp/setup-terraform@v3 | |
with: | |
terraform_wrapper: false | |
- name: Acceptance tests | |
run: make testacc | |
env: | |
# Environment variables for configuring the provider | |
OBSERVE_CUSTOMER: ${{ vars.OBSERVE_CUSTOMER }} | |
OBSERVE_DOMAIN: ${{ vars.OBSERVE_DOMAIN }} | |
OBSERVE_USER_EMAIL: ${{ vars.OBSERVE_USER_EMAIL }} | |
OBSERVE_USER_PASSWORD: ${{ secrets.OBSERVE_USER_PASSWORD }} | |
OBSERVE_WORKSPACE: ${{ vars.OBSERVE_WORKSPACE }} | |
OBSERVE_FILEDROP_ROLE_ARN: ${{ vars.OBSERVE_FILEDROP_ROLE_ARN }} | |
TF_LOG: ${{ runner.debug == '1' && 'DEBUG' || 'ERROR' }} | |
- uses: actions/upload-artifact@v4 | |
if: success() || failure() | |
with: | |
name: reports | |
path: | | |
test-report.xml | |
test-output.json | |
- name: Test Report | |
uses: EnricoMi/publish-unit-test-result-action@v2 | |
if: success() || failure() | |
with: | |
files: test-report.xml | |
comment_mode: 'off' | |
check_name: report | |
generate: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version-file: go.mod | |
- uses: hashicorp/setup-terraform@v3 | |
with: | |
terraform_wrapper: false | |
- run: go generate ./... | |
- name: git diff | |
run: | | |
git diff --compact-summary --exit-code || \ | |
(echo; echo "::error::Unexpected difference in directories after code generation. Run 'go generate ./...' command and commit."; exit 1) |