-
Notifications
You must be signed in to change notification settings - Fork 827
39 lines (38 loc) · 1.43 KB
/
e2e.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: E2E Test Check
on:
pull_request:
types: ['opened', 'synchronize']
paths:
- '.github/**'
- '.github/workflows/**'
- 'quickstart/**'
jobs:
e2e-check:
runs-on: [self-hosted, 1ES.Pool=terraform-azurerm-doc]
environment:
name: acctests
steps:
- name: checkout
uses: actions/checkout@v3
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v34
with:
dir_names: "true"
separator: ","
files: "quickstart/*"
files_ignore: "**/TestRecord.md"
dir_names_max_depth: 2
- name: test pr
run: |
az login --identity --username $MSI_ID > /dev/null
export ARM_SUBSCRIPTION_ID=$(az login --identity --username $MSI_ID | jq -r '.[0] | .id')
export ARM_TENANT_ID=$(az login --identity --username $MSI_ID | jq -r '.[0] | .tenantId')
export CHANGED_FOLDERS="${{ steps.changed-files.outputs.all_changed_files }}"
docker run --rm -v $(pwd):/src -w /src/test --network=host -e MSI_ID -e ARM_SUBSCRIPTION_ID -e ARM_TENANT_ID -e ARM_USE_MSI=true -e CHANGED_FOLDERS mcr.microsoft.com/azterraform:latest sh -c "go mod tidy && go test -timeout=360m -v ./e2e"
- uses: actions/upload-artifact@v3
with:
name: TestRecord-${{ github.event.number }}
retention-days: 60
path: |
quickstart/**/TestRecord.md.tmp