forked from terraform-aws-modules/terraform-aws-eks
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace travis with GitHub Actions (terraform-aws-modules#497)
- Loading branch information
1 parent
6c3e4ec
commit 2254ab7
Showing
4 changed files
with
43 additions
and
54 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Lint | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
validate: | ||
name: Validate | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
# - uses: actions/setup-ruby@v1 | ||
# with: | ||
# ruby-version: '2.4.6' | ||
# - name: Install Kitchen-Terraform | ||
# run: | | ||
# gem install bundler --no-document | ||
# bundle install | ||
- name: Install Terraform | ||
run: | | ||
export TERRAFORM_VERSION=$(curl -s https://checkpoint-api.hashicorp.com/v1/check/terraform | jq -r -M '.current_version') | ||
curl --silent --output terraform.zip "https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_amd64.zip" | ||
unzip terraform.zip ; rm -f terraform.zip; chmod +x terraform | ||
mkdir -p ${HOME}/bin ; export PATH=${PATH}:${HOME}/bin; mv terraform ${HOME}/bin/ | ||
terraform -v | ||
- name: Validate Code | ||
env: | ||
AWS_REGION: 'us-east-1' | ||
TF_VAR_region: ${AWS_REGION} | ||
TF_WARN_OUTPUT_ERRORS: 1 | ||
run: | | ||
terraform init | ||
terraform fmt -check=true | ||
terraform validate -var "region=${AWS_REGION}" -var "vpc_id=vpc-123456" -var "subnets=[\"subnet-12345a\"]" -var "workers_ami_id=ami-123456" -var "cluster_ingress_cidrs=[]" -var "cluster_name=test_cluster" | ||
- name: Validate Examples | ||
run: | | ||
for example in $(find examples -maxdepth 1 -mindepth 1 -type d); do | ||
cd $example | ||
terraform init | ||
terraform fmt -check=true | ||
terraform validate | ||
cd - | ||
done |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
2.4.4 | ||
2.4.6 |
This file was deleted.
Oops, something went wrong.
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