-
Notifications
You must be signed in to change notification settings - Fork 0
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
4 changed files
with
51 additions
and
60 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
60 changes: 27 additions & 33 deletions
60
.github/workflows/stateful-tests.yml → .github/workflows/tests.yml
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 |
---|---|---|
@@ -1,57 +1,51 @@ | ||
name: Stateful Tests | ||
name: Tests | ||
|
||
on: | ||
push: | ||
branches: '**' | ||
|
||
env: | ||
TERRAFORM_WORKING_DIR: ./tests/setup | ||
ANSIBLE_WORKING_DIR: ./tests/testsuite | ||
|
||
jobs: | ||
setup: | ||
runs-on: self-hosted | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: "3.10.12" | ||
|
||
- name: Install Python dependencies | ||
run: pip install --no-cache-dir --user ansible==9.5.1 | ||
|
||
- name: Setup Terraform | ||
uses: hashicorp/setup-terraform@v3 | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v3 | ||
- uses: hashicorp/setup-terraform@v3 | ||
with: | ||
terraform_version: "1.0.10" | ||
|
||
- name: Initialize Terraform infrastructure | ||
run: terraform init | ||
working-directory: ${{ env.TERRAFORM_WORKING_DIR }} | ||
|
||
- name: Apply Terraform infrastructure | ||
run: terraform apply --auto-approve | ||
working-directory: ${{ env.TERRAFORM_WORKING_DIR }} | ||
|
||
- name: test | ||
run: mv $(whereis terraform | awk '{print $2}') /usr/local/bin | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: "16" | ||
|
||
tests: | ||
testsuite: | ||
runs-on: self-hosted | ||
needs: setup | ||
env: | ||
TERRAFORM_WORKING_DIR: ./tests/setup | ||
ANSIBLE_WORKING_DIR: ./tests/testsuite | ||
steps: | ||
- name: Initialize Terraform infrastructure | ||
run: terraform init | ||
working-directory: ${{ env.TF_WORKING_DIR }} | ||
- uses: actions/setup-python@v3 | ||
with: | ||
python-version: "3.10.12" | ||
|
||
- name: Apply Terraform infrastructure | ||
run: terraform apply --auto-approve | ||
working-directory: ${{ env.TF_WORKING_DIR }} | ||
- name: Install Python dependencies | ||
run: pip install --no-cache-dir --user ansible==9.5.1 | ||
|
||
- name: Run Ansible testsuite | ||
run: ansible-playbook --inventory inventory.yml deploy.yml | ||
working-directory: ${{ env.ANSIBLE_WORKING_DIR }} | ||
|
||
cleanup: | ||
runs-on: self-hosted | ||
needs: testsuite | ||
steps: | ||
- name: Destroy Terraform environment | ||
if: always() | ||
run: terraform destroy --auto-approve | ||
working-directory: ${{ env.TF_WORKING_DIR }} | ||
working-directory: ${{ env.TERRAFORM_WORKING_DIR }} |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
![Stateful Tests](https://github.com/szachovy/superset-cluster/actions/workflows/stateful-tests.yml/badge.svg) | ||
![Static Tests](https://github.com/szachovy/superset-cluster/actions/workflows/static-tests.yml/badge.svg) | ||
![Tests](https://github.com/szachovy/superset-cluster/actions/workflows/stateful-tests.yml/badge.svg) | ||
Check failure on line 1 in README.md GitHub Actions / run-markdown-lint
|
||
![Style](https://github.com/szachovy/superset-cluster/actions/workflows/static-tests.yml/badge.svg) | ||
![System Tests Coverage](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/szachovy/d4fd269e226b0ed70954f861129a2756/raw/superset-cluster-codecoverage.json) | ||
|
||
# superset-cluster | ||
|
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