Skip to content

Commit 96a92e1

Browse files
committed
refactor: Use one workflow for PRs and pushes
1 parent 29a447d commit 96a92e1

File tree

4 files changed

+32
-34
lines changed

4 files changed

+32
-34
lines changed

.github/workflows/ci.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
name: CI
22

33
on:
4+
pull_request:
5+
branches:
6+
- main
7+
paths-ignore:
8+
- .editorconfig
9+
- .gitignore
10+
- CHANGELOG.md
11+
- LICENSE.md
12+
- Makefile
13+
- README.md
414
push:
515
branches:
616
- main
@@ -29,9 +39,12 @@ jobs:
2939
run: terraform fmt -check -recursive
3040
- name: Validate the configuration
3141
run: terraform validate
42+
- name: Run unit tests
43+
run: terraform test
3244

3345
release:
3446
name: Release?
47+
if: github.event == 'push'
3548
needs: [ verify ]
3649
permissions:
3750
contents: write

.github/workflows/pr.yaml

Lines changed: 0 additions & 31 deletions
This file was deleted.

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ without requiring AWS credentials to be stored as long-lived GitHub secrets.
1212

1313
### Requirements
1414

15-
- [AWS Provider] 4.0+
16-
- [TLS Provider] 3.0+
17-
- [Terraform] 1.0+
15+
- [AWS Provider] 5.0+
16+
- [TLS Provider] 4.0+
17+
- [Terraform] 1.10+
1818

1919
### Installation and usage
2020

oidc-github.tftest.hcl

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
provider "aws" {
2+
region = "eu-west-1"
3+
}
4+
5+
run "single_github_repository_no_branch_specified" {
6+
variables {
7+
github_repositories = ["unfunco/terraform-aws-oidc-github"]
8+
}
9+
10+
command = plan
11+
12+
assert {
13+
condition = aws_s3_bucket.bucket.bucket == "test-bucket"
14+
error_message = "S3 bucket name did not match expected"
15+
}
16+
}

0 commit comments

Comments
 (0)