-
-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
142 additions
and
0 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 |
---|---|---|
|
@@ -45,6 +45,13 @@ jobs: | |
run: | | ||
make version | ||
- name: Upload build artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: build-artifacts | ||
path: | | ||
./build/ | ||
# run acceptance tests | ||
test: | ||
name: Test | ||
|
@@ -78,3 +85,128 @@ jobs: | |
publish: false | ||
format: binary | ||
secrets: inherit | ||
|
||
# run localstack demo tests | ||
localstack: | ||
name: LocalStack Demo Tests | ||
needs: build | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
demo-folder: | ||
- demo-localstack | ||
|
||
timeout-minutes: 20 | ||
steps: | ||
- name: Download build artifacts | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: build-artifacts | ||
path: /usr/local/bin | ||
|
||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v4 | ||
|
||
- name: Start LocalStack | ||
uses: LocalStack/[email protected] | ||
env: | ||
AWS_DEFAULT_REGION: us-east-1 | ||
AWS_REGION: us-east-1 | ||
AWS_ACCESS_KEY_ID: test | ||
AWS_SECRET_ACCESS_KEY: test | ||
SERVICES: s3, iam, lambda, dynamodb, sts, account, ec2 | ||
with: | ||
image-tag: 'latest' | ||
install-awslocal: 'true' | ||
|
||
- name: Run tests for ${{ matrix.demo-folder }} | ||
run: | | ||
cd examples/${{ matrix.demo-folder }} | ||
atmos test | ||
- name: Stop LocalStack | ||
run: | | ||
docker stop ${{ steps.localstack.outputs.container_id }} | ||
# run k3s demo tests | ||
k3s: | ||
name: k3s Demo Tests | ||
needs: build | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
demo-folder: | ||
- demo-helmfile | ||
|
||
timeout-minutes: 20 | ||
steps: | ||
- name: Download build artifacts | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: build-artifacts | ||
path: /usr/local/bin | ||
|
||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v4 | ||
|
||
- uses: nolar/setup-k3d-k3s@v1 | ||
with: | ||
version: v1.30 | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Get dependencies | ||
run: | | ||
make deps | ||
- name: Run tests for ${{ matrix.demo-folder }} | ||
run: | | ||
cd examples/${{ matrix.demo-folder }} | ||
atmos test | ||
# run other demo tests | ||
mock: | ||
name: Other Demo Tests (No Provider Required) | ||
needs: build | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
demo-folder: | ||
- demo-atlantis | ||
- demo-component-manifest | ||
- demo-component-versions | ||
- demo-context | ||
- demo-custom-command | ||
- demo-json-validation | ||
- demo-library | ||
- demo-opa-validation | ||
- demo-opentofu | ||
- demo-project | ||
- demo-stacks | ||
- demo-terraform | ||
- demo-terraform-overrides | ||
- demo-workflows | ||
- demo-yaml-anchors | ||
- demo-mock-architecture | ||
- demo-stack-templating | ||
- demo-multi-cloud | ||
- demo-vendoring | ||
|
||
timeout-minutes: 20 | ||
steps: | ||
- name: Download build artifacts | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: build-artifacts | ||
path: /usr/local/bin | ||
|
||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v4 | ||
|
||
- name: Get dependencies | ||
run: | | ||
make deps | ||
- name: Run tests for ${{ matrix.demo-folder }} | ||
run: | | ||
cd examples/${{ matrix.demo-folder }} | ||
atmos test |
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,3 @@ | ||
data "github_repository" "repo" { | ||
full_name = var.repository | ||
} |
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,7 @@ | ||
data "http" "ipinfo" { | ||
url = var.ip_address != "" ? "https://ipinfo.io/${var.ip_address}" : "https://ipinfo.io" | ||
|
||
request_headers = { | ||
Accept = "application/json" | ||
} | ||
} |