Skip to content

Commit

Permalink
disable parallel execution of tests and plugin cache (#887)
Browse files Browse the repository at this point in the history
  • Loading branch information
ludoo authored Oct 14, 2022
1 parent b39abd2 commit 680eb65
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 50 deletions.
44 changes: 4 additions & 40 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,6 @@ jobs:
terraform_version: ${{ env.TF_VERSION }}
terraform_wrapper: false

- name: Config Terraform plugin cache
run: |
echo 'plugin_cache_dir="$HOME/.terraform.d/plugin-cache"' >~/.terraformrc
mkdir --parents ~/.terraform.d/plugin-cache
- name: Initialize providers
run: |
terraform init
# avoid conflicts with user-installed providers on local machines
- name: Pin provider versions
run: |
Expand All @@ -75,7 +66,7 @@ jobs:
run: |
mkdir -p ${{ env.TF_PLUGIN_CACHE_DIR }}
pip install -r tests/requirements.txt
pytest -vv --numprocesses auto --dist loadgroup tests/examples
pytest -vv tests/examples
examples:
runs-on: ubuntu-latest
Expand All @@ -98,15 +89,6 @@ jobs:
terraform_version: ${{ env.TF_VERSION }}
terraform_wrapper: false

- name: Config Terraform plugin cache
run: |
echo 'plugin_cache_dir="$HOME/.terraform.d/plugin-cache"' >~/.terraformrc
mkdir --parents ~/.terraform.d/plugin-cache
- name: Initialize providers
run: |
terraform init
# avoid conflicts with user-installed providers on local machines
- name: Pin provider versions
run: |
Expand All @@ -119,7 +101,7 @@ jobs:
run: |
mkdir -p ${{ env.TF_PLUGIN_CACHE_DIR }}
pip install -r tests/requirements.txt
pytest -vv --numprocesses auto --dist loadgroup tests/blueprints
pytest -vv tests/blueprints
modules:
runs-on: ubuntu-latest
Expand All @@ -142,15 +124,6 @@ jobs:
terraform_version: ${{ env.TF_VERSION }}
terraform_wrapper: false

- name: Config Terraform plugin cache
run: |
echo 'plugin_cache_dir="$HOME/.terraform.d/plugin-cache"' >~/.terraformrc
mkdir --parents ~/.terraform.d/plugin-cache
- name: Initialize providers
run: |
terraform init
# avoid conflicts with user-installed providers on local machines
- name: Pin provider versions
run: |
Expand All @@ -163,7 +136,7 @@ jobs:
run: |
mkdir -p ${{ env.TF_PLUGIN_CACHE_DIR }}
pip install -r tests/requirements.txt
pytest -vv --numprocesses auto --dist loadgroup tests/modules
pytest -vv tests/modules
fast:
runs-on: ubuntu-latest
Expand All @@ -186,15 +159,6 @@ jobs:
terraform_version: ${{ env.TF_VERSION }}
terraform_wrapper: false

- name: Config Terraform plugin cache
run: |
echo 'plugin_cache_dir="$HOME/.terraform.d/plugin-cache"' >~/.terraformrc
mkdir --parents ~/.terraform.d/plugin-cache
- name: Initialize providers
run: |
terraform init
# avoid conflicts with user-installed providers on local machines
- name: Pin provider versions
run: |
Expand All @@ -207,4 +171,4 @@ jobs:
run: |
mkdir -p ${{ env.TF_PLUGIN_CACHE_DIR }}
pip install -r tests/requirements.txt
pytest -vv --numprocesses auto --dist loadgroup tests/fast
pytest -vv tests/fast
12 changes: 2 additions & 10 deletions default-versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 4.36.0" # tftest
version = ">= 4.36.0"
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 4.36.0" # tftest
}
# used in modules
archive = {
source = "hashicorp/archive"
}
# used in fast
local = {
source = "hashicorp/local"
version = ">= 4.36.0"
}
}
}
Expand Down

0 comments on commit 680eb65

Please sign in to comment.