resource/alicloud_ess_scaling_configuration: add attribute custom_priorities. #14990
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: Terrafrom Basic Checks | |
on: | |
pull_request: | |
paths: | |
- .github/workflows/acctest-terraform-basic.yml | |
- alicloud/*.go | |
branches: | |
- master | |
jobs: | |
BreakingChange: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.20.x' | |
- uses: actions/checkout@v3 | |
with: | |
# Checkout as many commits as needed for the diff | |
fetch-depth: 2 | |
- name: Attribute Breaking Change Check | |
run: | | |
git diff HEAD^ HEAD > diff.out | |
go run scripts/breaking_change_check.go -fileNames="diff.out" | |
Consistency: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.20.x' | |
- uses: actions/checkout@v3 | |
with: | |
# Checkout as many commits as needed for the diff | |
fetch-depth: 2 | |
- name: Attribute Consistency Check | |
run: | | |
git diff HEAD^ HEAD > diff.out | |
go run scripts/consistency_check.go -fileNames="diff.out" | |
Formatter: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
# Checkout as many commits as needed for the diff | |
fetch-depth: 2 | |
- name: Set up Go Version | |
uses: actions/setup-go@v2 | |
with: | |
go-version: '1.20.x' | |
- name: Get dependencies | |
run: | | |
go install golang.org/x/tools/cmd/goimports@v0.24.0 | |
go mod tidy | |
- name: Golang Formatter Check | |
run: | | |
if [[ $(git diff --name-only HEAD^ HEAD | grep -c "^alicloud/") -lt 1 ]]; then | |
echo -e "\033[33m[WARNING]\033[0m there are no go files were changed, skipped." | |
exit 0 | |
fi | |
exitCode=0 | |
echo "==> Checking that code complies with gofmt and goimports requirements..." | |
diffFiles=$(git diff --name-only HEAD^ HEAD | grep "^alicloud/") | |
for fileName in ${diffFiles[@]}; | |
do | |
if [[ ! -f ${filename} ]]; then | |
continue | |
fi | |
goimpFile=$(goimports -l ${fileName}) | |
if [[ -n ${goimpFile} ]]; then | |
goimports -d ${fileName} | |
exitCode=1 | |
fi | |
gofmtFile=$(gofmt -l ${fileName}) | |
if [[ -n ${gofmtFile} ]]; then | |
gofmt -d ${fileName} | |
exitCode=1 | |
fi | |
done | |
if [[ ${exitCode} -gt 0 ]]; then | |
echo -e "\n\033[31m[Error]\033[0m==> gofmt or goimports needs running on the above files. You can use the command: \`make fmt\` to reformat code. \033[0m" | |
exit 1 | |
fi | |
echo -e "==> PASS" | |
Compile: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
# Checkout as many commits as needed for the diff | |
fetch-depth: 2 | |
- name: Set up Go Version | |
uses: actions/setup-go@v2 | |
with: | |
go-version: '1.20.x' | |
- name: vet | |
run: | | |
make vet |