-
Notifications
You must be signed in to change notification settings - Fork 807
41 lines (40 loc) · 1.65 KB
/
weekly-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
40
41
name: Weekly E2E Test Check
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * 0'
permissions:
actions: write
contents: write
jobs:
full-e2e-check:
runs-on: ubuntu-latest
timeout-minutes: 1440
environment:
name: crontests
steps:
- name: checkout
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 #v3.6.0
- name: test all examples
continue-on-error: true
timeout-minutes: 1440
run: |
git config --global --add safe.directory '*'
export ARM_OIDC_REQUEST_TOKEN=$ACTIONS_ID_TOKEN_REQUEST_TOKEN
export ARM_OIDC_REQUEST_URL=$ACTIONS_ID_TOKEN_REQUEST_URL
export ARM_SUBSCRIPTION_ID=${{ secrets.ARM_SUBSCRIPTION_ID }}
export ARM_TENANT_ID=${{ secrets.ARM_TENANT_ID }}
export ARM_CLIENT_ID=${{ secrets.ARM_CLIENT_ID_CRONTEST }}
docker run --rm -v $(pwd):/src -w /src/test -e MSI_ID -e ARM_SUBSCRIPTION_ID -e ARM_CLIENT_ID -e ARM_TENANT_ID -e ARM_OIDC_REQUEST_TOKEN -e ARM_OIDC_REQUEST_URL -e ARM_USE_OIDC=true -e CHANGED_FOLDERS mcr.microsoft.com/azterraform sh -c "go mod tidy && go test -timeout=1440m -parallel 10 -v ./e2e"
- name: Update
run: |
docker run --rm -v $(pwd):/src -w /src mcr.microsoft.com/azterraform sh scripts/update-test-record.sh
cd .git
sudo chmod -R a+rwX .
sudo find . -type d -exec chmod g+s '{}' +
- name: Commit & Push changes
uses: actions-js/push@156f2b10c3aa000c44dbe75ea7018f32ae999772 #v1.4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
message: 'Update TestRecord'
branch: ${{ env.default_branch }}