Skip to content

Commit 8500b64

Browse files
committed
test
1 parent 4820614 commit 8500b64

File tree

4 files changed

+29
-14
lines changed

4 files changed

+29
-14
lines changed

.github/workflows/e2e.yml

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,42 +7,42 @@ on:
77
types: [ 'opened', 'synchronize' ]
88
paths:
99
- '.github/**'
10-
- '.github/workflows/**'
1110
- 'quickstarts/**'
11+
- 'tech-solution/**'
1212

1313
jobs:
1414
terraform-fmt:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- uses: actions/checkout@v4
18-
1918
- uses: hashicorp/setup-terraform@v3
20-
2119
- name: Terraform fmt
2220
id: fmt
23-
run: terraform -chdir=quickstarts fmt -check -recursive
21+
run: |
22+
terraform -chdir=quickstarts fmt -check -recursive
23+
terraform -chdir=tech-solution fmt -check -recursive
2424
2525
2626
terraform-validate:
2727
runs-on: ubuntu-latest
2828
steps:
2929
- uses: actions/checkout@v4
30-
3130
- uses: hashicorp/setup-terraform@v3
32-
3331
- name: Get changed files
3432
id: changed-files
3533
uses: tj-actions/changed-files@v34
3634
with:
3735
dir_names: "true"
3836
separator: ","
39-
files: "quickstarts/*"
37+
files: |
38+
quickstarts/*
39+
tech-solution/*
4040
dir_names_max_depth: 3
41-
- name: pr-check
41+
- name: Terraform validate
4242
run: |
4343
CHANGED_FOLDERS="${{ steps.changed-files.outputs.all_changed_files }}"
4444
if [ -z "$CHANGED_FOLDERS" ]; then
45-
echo "No changed quickstarts found"
45+
echo "No changed terraform code found"
4646
exit 0
4747
fi
4848
@@ -54,7 +54,7 @@ jobs:
5454
terraform -chdir=$f init -upgrade
5555
terraform -chdir=$f validate
5656
if [[ $? -ne 0 ]]; then
57-
echo -e "\033[31m[ERROR]\033[0m: Some quickstarts codes contain errors, and please running terraform validate command before pushing."
57+
echo -e "\033[31m[ERROR]\033[0m: Some terraform codes contain errors, and please running terraform validate command before pushing."
5858
exit 1
5959
fi
6060
done
@@ -63,7 +63,7 @@ jobs:
6363
e2e-check:
6464
needs: [terraform-fmt, terraform-validate]
6565
runs-on: ubuntu-latest
66-
name: 'e2e check'
66+
name: e2e check
6767
steps:
6868
- name: checkout
6969
uses: actions/checkout@v3
@@ -80,7 +80,9 @@ jobs:
8080
with:
8181
dir_names: "true"
8282
separator: ","
83-
files: "quickstarts/*"
83+
files: |
84+
quickstarts/*
85+
tech-solution/*
8486
dir_names_max_depth: 3
8587
- name: set id
8688
id: set-job-id
@@ -98,7 +100,7 @@ jobs:
98100
run: |
99101
CHANGED_FOLDERS="${{ steps.changed-files.outputs.all_changed_files }}"
100102
if [ -z "$CHANGED_FOLDERS" ]; then
101-
echo "No changed quickstarts found"
103+
echo "No changed terraform code found"
102104
exit 0
103105
fi
104106
objectPath="github-action/${{github.repository}}/e2e/Action-${{github.run_number}}-${{github.run_id}}-${{ steps.set-job-id.outputs.jobId }}"

quickstarts/VPC/101-vpc-docs-Example/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
variable "name" {
2-
default = "terraform-example"
2+
default = "terraform-example1"
33
}
44

55

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
variable "name" {
2+
default = "terraform-example1"
3+
}
4+
5+
6+
resource "alicloud_vpc" "default" {
7+
ipv6_isp = "BGP"
8+
description = "test"
9+
cidr_block = "10.0.0.0/8"
10+
vpc_nam = var.name
11+
enable_ipv6 = true
12+
}

0 commit comments

Comments
 (0)