Skip to content

Commit 89a7687

Browse files
author
iru
committed
chore(ci): run int-tests only on *.tf path
1 parent f756c4f commit 89a7687

File tree

3 files changed

+36
-27
lines changed

3 files changed

+36
-27
lines changed

.github/workflows/ci-test-cleanup.yaml renamed to .github/workflows/ci-integration-cleanup-force.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: CI - Test Cleanup
1+
name: CI - Integration Tests - Cleanup
22
on:
33
workflow_dispatch
44

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: CI - Integration Tests
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- master
8+
paths:
9+
- '**.tf'
10+
jobs:
11+
integration_test:
12+
name: Test-Kitchen
13+
runs-on: ubuntu-latest
14+
env:
15+
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
16+
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
17+
AWS_REGION: ${{ secrets.AWS_REGION }}
18+
TF_VAR_sysdig_secure_endpoint: https://secure.sysdig.com
19+
TF_VAR_sysdig_secure_api_token: ${{secrets.KUBELAB_SECURE_API_TOKEN}}
20+
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v2
24+
25+
- uses: ruby/setup-ruby@v1
26+
with:
27+
ruby-version: 2.7
28+
bundler-cache: true
29+
30+
- name: Run test
31+
run: bundle exec kitchen test
32+
33+
- name: Destroy resources
34+
if: ${{ failure() }}
35+
run: bundle exec kitchen destroy

.github/workflows/ci-pull-request.yaml

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -109,29 +109,3 @@ jobs:
109109
# Run all pre-commit checks on max version supported
110110
if: ${{ matrix.version == needs.getTerraformMinMaxVersion.outputs.maxVersion }}
111111
run: pre-commit run --color=always --show-diff-on-failure --all-files
112-
113-
integration_test:
114-
name: Test-Kitchen
115-
runs-on: ubuntu-latest
116-
env:
117-
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
118-
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
119-
AWS_REGION: ${{ secrets.AWS_REGION }}
120-
TF_VAR_sysdig_secure_endpoint: https://secure.sysdig.com
121-
TF_VAR_sysdig_secure_api_token: ${{secrets.KUBELAB_SECURE_API_TOKEN}}
122-
123-
steps:
124-
- name: Checkout
125-
uses: actions/checkout@v2
126-
127-
- uses: ruby/setup-ruby@v1
128-
with:
129-
ruby-version: 2.7
130-
bundler-cache: true
131-
132-
- name: Run test
133-
run: bundle exec kitchen test
134-
135-
- name: Destroy resources
136-
if: ${{ failure() }}
137-
run: bundle exec kitchen destroy

0 commit comments

Comments
 (0)