Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade Nodejs runtime from 12 to 16 #170

Merged
merged 5 commits into from
Apr 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,16 @@ jobs:
os: [ubuntu-latest, windows-latest, macos-latest]

steps:
- name: Checkout
uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Setup Node.js 12.x
uses: actions/setup-node@v1
- name: Setup Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: '12.x'
node-version: '16.x'

- name: Install
run: npm clean-install

- name: Verify
if: runner.os == 'Linux'
run: |
Expand Down
134 changes: 67 additions & 67 deletions .github/workflows/setup-terraform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,40 +12,40 @@ defaults:

jobs:
terraform-versions:
name: 'Terraform Versions'
name: 'Terraform Versions'
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
terraform-versions: [0.11.14, latest]
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Setup Terraform - ${{ matrix['terraform-versions'] }}
uses: ./
with:
terraform_version: ${{ matrix['terraform-versions'] }}

- name: Validate Teraform Version - ${{ matrix['terraform-versions'] }}
if: ${{ matrix['terraform-versions'] != 'latest' }}
run: terraform version | grep ${{ matrix['terraform-versions']}}

- name: Validate Teraform Version - ${{ matrix['terraform-versions'] }}
if: ${{ matrix['terraform-versions'] == 'latest' }}
run: terraform version | grep 'Terraform v'

terraform-versions-no-wrapper:
name: 'Terraform Versions No Wrapper'
name: 'Terraform Versions No Wrapper'
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
terraform-versions: [0.11.14, latest]
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Setup Terraform (no wrapper) - ${{ matrix['terraform-versions'] }}
uses: ./
with:
Expand All @@ -59,17 +59,17 @@ jobs:
- name: Validate Teraform Version - ${{ matrix['terraform-versions'] }}
if: ${{ matrix['terraform-versions'] == 'latest' }}
run: terraform version | grep 'Terraform v'

terraform-versions-constraints:
name: 'Terraform Versions Constraints'
name: 'Terraform Versions Constraints'
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
terraform-versions: [~0.12, 0.12.x, <0.13.0]
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Setup Terraform - ${{ matrix['terraform-versions'] }}
uses: ./
Expand All @@ -78,18 +78,18 @@ jobs:

- name: Validate Teraform Version - ${{ matrix['terraform-versions'] }}
run: terraform version | grep 'Terraform v0\.12'

terraform-versions-constraints-no-wrapper:
name: 'Terraform Versions Constraints No Wrapper'
name: 'Terraform Versions Constraints No Wrapper'
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
terraform-versions: [~0.12, 0.12.x, <0.13.0]
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Setup Terraform (no wrapper) - ${{ matrix['terraform-versions'] }}
uses: ./
with:
Expand All @@ -98,9 +98,9 @@ jobs:

- name: Validate Teraform Version - ${{ matrix['terraform-versions'] }}
run: terraform version | grep 'Terraform v0\.12'

terraform-credentials-cloud:
name: 'Terraform Cloud Credentials'
name: 'Terraform Cloud Credentials'
runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand All @@ -109,14 +109,14 @@ jobs:
TF_CLOUD_API_TOKEN: 'XXXXXXXXXXXXXX.atlasv1.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Setup Terraform
uses: ./
with:
cli_config_credentials_token: ${{ env.TF_CLOUD_API_TOKEN }}
- name: Validate Terraform Credentials (Windows)

- name: Validate Terraform Credentials (Windows)
if: runner.os == 'Windows'
run: |
cat ${APPDATA}/terraform.rc | grep 'credentials "app.terraform.io"'
Expand All @@ -127,9 +127,9 @@ jobs:
run: |
cat ${HOME}/.terraformrc | grep 'credentials "app.terraform.io"'
cat ${HOME}/.terraformrc | grep 'token = "${{ env.TF_CLOUD_API_TOKEN }}"'

terraform-credentials-enterprise:
name: 'Terraform Enterprise Credentials'
name: 'Terraform Enterprise Credentials'
runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand All @@ -138,15 +138,15 @@ jobs:
TF_CLOUD_API_TOKEN: 'XXXXXXXXXXXXXX.atlasv1.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Setup Terraform
uses: ./
with:
cli_config_credentials_hostname: 'terraform.example.com'
cli_config_credentials_token: ${{ env.TF_CLOUD_API_TOKEN }}
- name: Validate Terraform Credentials (Windows)

- name: Validate Terraform Credentials (Windows)
if: runner.os == 'Windows'
run: |
cat ${APPDATA}/terraform.rc | grep 'credentials "terraform.example.com"'
Expand All @@ -157,96 +157,96 @@ jobs:
run: |
cat ${HOME}/.terraformrc | grep 'credentials "terraform.example.com"'
cat ${HOME}/.terraformrc | grep 'token = "${{ env.TF_CLOUD_API_TOKEN }}"'

terraform-credentials-none:
name: 'Terraform No Credentials'
name: 'Terraform No Credentials'
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Setup Terraform
uses: ./
- name: Validate Terraform Credentials (Windows)

- name: Validate Terraform Credentials (Windows)
if: runner.os == 'Windows'
run: |
[[ -f ${APPDATA}/terraform.rc ]] || exit 0

- name: Validate Teraform Credentials (Linux & macOS)
if: runner.os != 'Windows'
run: |
[[ -f ${HOME}/.terraformrc ]] || exit 0

terraform-arguments:
name: 'Terraform Arguments'
name: 'Terraform Arguments'
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Setup Terraform
uses: ./

- name: Check No Arguments
run: terraform || exit 0

- name: Check Single Argument
run: terraform help || exit 0

- name: Check Single Argument Hyphen
run: terraform -help

- name: Check Single Argument Double Hyphen
run: terraform --help

- name: Check Single Argument Subcommand
run: terraform fmt -check

- name: Check Multiple Arguments Subcommand
run: terraform fmt -check -list=true -no-color

terraform-arguments-no-wrapper:
name: 'Terraform Arguments No Wrapper'
name: 'Terraform Arguments No Wrapper'
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Setup Terraform
uses: ./
with:
terraform_wrapper: false

- name: Check No Arguments
run: terraform || exit 0

- name: Check Single Argument
run: terraform help || exit 0

- name: Check Single Argument Hyphen
run: terraform -help

- name: Check Single Argument Double Hyphen
run: terraform --help

- name: Check Single Argument Subcommand
run: terraform fmt -check

- name: Check Multiple Arguments Subcommand
run: terraform fmt -check -list=true -no-color

terraform-run-local:
name: 'Terraform Run Local'
name: 'Terraform Run Local'
runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand All @@ -256,30 +256,30 @@ jobs:
working-directory: ./.github/workflows/data/local
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Setup Terraform
uses: ./
- name: Terraform Init

- name: Terraform Init
shell: bash
run: terraform init
- name: Terraform Format

- name: Terraform Format
shell: bash
run: terraform fmt -check
- name: Terraform Plan

- name: Terraform Plan
id: plan
shell: bash
run: terraform plan
run: terraform plan

- name: Print Terraform Plan
- name: Print Terraform Plan
shell: bash
run: echo "${{ steps.plan.outputs.stdout }}"

terraform-run-local-no-wrapper:
name: 'Terraform Run Local No Wrapper'
name: 'Terraform Run Local No Wrapper'
runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand All @@ -289,22 +289,22 @@ jobs:
working-directory: ./.github/workflows/data/local
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Setup Terraform
uses: ./
with:
terraform_wrapper: false
- name: Terraform Init

- name: Terraform Init
shell: bash
run: terraform init
- name: Terraform Format

- name: Terraform Format
shell: bash
run: terraform fmt -check
- name: Terraform Plan

- name: Terraform Plan
id: plan
shell: bash
run: terraform plan
run: terraform plan
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ inputs:
default: 'true'
required: false
runs:
using: 'node12'
using: 'node16'
main: 'dist/index.js'
branding:
icon: 'terminal'
Expand Down
Loading