Skip to content

Commit f6705b2

Browse files
authored
Merge pull request #10 from terraform-linters/github_actions
Setup GitHub Actions
2 parents dda34f3 + a7675b3 commit f6705b2

File tree

6 files changed

+101
-6
lines changed

6 files changed

+101
-6
lines changed

.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: gomod
4+
directory: "/"
5+
schedule:
6+
interval: weekly
7+
open-pull-requests-limit: 10
8+
- package-ecosystem: "github-actions"
9+
directory: "/"
10+
schedule:
11+
interval: weekly

.github/workflows/build.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: build
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
schedule:
11+
- cron: "0 0 * * *"
12+
13+
jobs:
14+
test:
15+
name: ${{ matrix.os }}
16+
runs-on: ${{ matrix.os }}
17+
strategy:
18+
matrix:
19+
os: [ubuntu-latest, windows-latest]
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v2
23+
- name: Set up Go
24+
uses: actions/[email protected]
25+
with:
26+
go-version: 1.15
27+
- name: Run tests
28+
run: make test
29+
- name: Run build
30+
run: make build
31+
- name: Upload Artifact
32+
uses: actions/upload-artifact@master
33+
with:
34+
name: tflint-ruleset-aws-${{ matrix.os }}
35+
path: tflint-ruleset-aws
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: generated-code
2+
3+
on: pull_request
4+
5+
jobs:
6+
checks:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout
10+
uses: actions/checkout@master
11+
with:
12+
submodules: true
13+
- name: Set up Go
14+
uses: actions/[email protected]
15+
with:
16+
go-version: 1.15
17+
- name: go generate and diff checks
18+
run: go generate ./... && git diff --exit-code

.github/workflows/release.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: release
2+
3+
on:
4+
push:
5+
branches:
6+
- '!*'
7+
tags:
8+
- v*.*.*
9+
10+
jobs:
11+
goreleaser:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v2
16+
- name: Set up Go
17+
uses: actions/[email protected]
18+
with:
19+
go-version: 1.15
20+
- name: Run GoReleaser
21+
env:
22+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
23+
VERSION: v0.143.0
24+
run: curl -sL https://git.io/goreleaser | bash

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
# TFLint Ruleset for terraform-provider-aws
2+
[![Build Status](https://github.com/terraform-linters/tflint-ruleset-aws/workflows/build/badge.svg?branch=master)](https://github.com/terraform-linters/tflint-ruleset-aws/actions)
3+
[![GitHub release](https://img.shields.io/github/release/terraform-linters/tflint-ruleset-aws.svg)](https://github.com/terraform-linters/tflint-ruleset-aws/releases/latest)
4+
[![License: MPL 2.0](https://img.shields.io/badge/License-MPL%202.0-blue.svg)](LICENSE)
25

36
TFLint ruleset plugin for Terraform AWS Provider
47

aws/client_test.go

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,11 @@ func Test_getBaseConfig(t *testing.T) {
2828
Region: "us-east-1",
2929
},
3030
Expected: &awsbase.Config{
31-
AccessKey: "AWS_ACCESS_KEY",
32-
SecretKey: "AWS_SECRET_KEY",
33-
Region: "us-east-1",
31+
AccessKey: "AWS_ACCESS_KEY",
32+
SecretKey: "AWS_SECRET_KEY",
33+
Region: "us-east-1",
34+
CallerDocumentationURL: "https://github.com/terraform-linters/tflint-ruleset-aws/blob/master/docs/deep_checking.md",
35+
CallerName: "tflint-ruleset-aws",
3436
},
3537
},
3638
{
@@ -41,9 +43,11 @@ func Test_getBaseConfig(t *testing.T) {
4143
Region: "us-east-1",
4244
},
4345
Expected: &awsbase.Config{
44-
Profile: "default",
45-
CredsFilename: filepath.Join(home, ".aws", "creds"),
46-
Region: "us-east-1",
46+
Profile: "default",
47+
CredsFilename: filepath.Join(home, ".aws", "creds"),
48+
Region: "us-east-1",
49+
CallerDocumentationURL: "https://github.com/terraform-linters/tflint-ruleset-aws/blob/master/docs/deep_checking.md",
50+
CallerName: "tflint-ruleset-aws",
4751
},
4852
},
4953
}

0 commit comments

Comments
 (0)