Simplify testing workflow
This commit is contained in:
parent
1ff3bf9327
commit
744863b9a3
|
@ -45,7 +45,7 @@ runs:
|
||||||
| tee -a /home/runner/.terraformrc
|
| tee -a /home/runner/.terraformrc
|
||||||
echo 'disable_checkpoint = true' \
|
echo 'disable_checkpoint = true' \
|
||||||
| tee -a /home/runner/.terraformrc
|
| tee -a /home/runner/.terraformrc
|
||||||
mkdir -p /home/runner/.terraform.d/plugin-cache
|
mkdir -p ${{ env.TF_PLUGIN_CACHE_DIR }}
|
||||||
# avoid conflicts with user-installed providers on local machines
|
# avoid conflicts with user-installed providers on local machines
|
||||||
- name: Pin provider versions
|
- name: Pin provider versions
|
||||||
shell: bash
|
shell: bash
|
||||||
|
@ -53,3 +53,7 @@ runs:
|
||||||
for f in $(find . -name versions.tf); do
|
for f in $(find . -name versions.tf); do
|
||||||
sed -i 's/>=\(.*# tftest\)/=\1/g' $f;
|
sed -i 's/>=\(.*# tftest\)/=\1/g' $f;
|
||||||
done
|
done
|
||||||
|
- name: Install Python Dependencies
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
pip install -r tests/requirements.txt
|
||||||
|
|
|
@ -43,10 +43,7 @@ jobs:
|
||||||
TERRAFORM_VERSION: ${{ env.TERRAFORM_VERSION }}
|
TERRAFORM_VERSION: ${{ env.TERRAFORM_VERSION }}
|
||||||
|
|
||||||
- name: Run tests on documentation examples
|
- name: Run tests on documentation examples
|
||||||
id: pytest
|
run: pytest -vv -k blueprints/ tests/examples
|
||||||
run: |
|
|
||||||
pip install -r tests/requirements.txt
|
|
||||||
pytest -vv -k blueprints/ tests/examples
|
|
||||||
|
|
||||||
examples-modules:
|
examples-modules:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
@ -60,11 +57,7 @@ jobs:
|
||||||
TERRAFORM_VERSION: ${{ env.TERRAFORM_VERSION }}
|
TERRAFORM_VERSION: ${{ env.TERRAFORM_VERSION }}
|
||||||
|
|
||||||
- name: Run tests on documentation examples
|
- name: Run tests on documentation examples
|
||||||
id: pytest
|
run: pytest -vv -k modules/ tests/examples
|
||||||
run: |
|
|
||||||
mkdir -p ${{ env.TF_PLUGIN_CACHE_DIR }}
|
|
||||||
pip install -r tests/requirements.txt
|
|
||||||
pytest -vv -k modules/ tests/examples
|
|
||||||
|
|
||||||
blueprints:
|
blueprints:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
@ -78,11 +71,7 @@ jobs:
|
||||||
TERRAFORM_VERSION: ${{ env.TERRAFORM_VERSION }}
|
TERRAFORM_VERSION: ${{ env.TERRAFORM_VERSION }}
|
||||||
|
|
||||||
- name: Run tests environments
|
- name: Run tests environments
|
||||||
id: pytest
|
run: pytest -vv tests/blueprints
|
||||||
run: |
|
|
||||||
mkdir -p ${{ env.TF_PLUGIN_CACHE_DIR }}
|
|
||||||
pip install -r tests/requirements.txt
|
|
||||||
pytest -vv tests/blueprints
|
|
||||||
|
|
||||||
modules:
|
modules:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
@ -96,11 +85,7 @@ jobs:
|
||||||
TERRAFORM_VERSION: ${{ env.TERRAFORM_VERSION }}
|
TERRAFORM_VERSION: ${{ env.TERRAFORM_VERSION }}
|
||||||
|
|
||||||
- name: Run tests modules
|
- name: Run tests modules
|
||||||
id: pytest
|
run: pytest -vv tests/modules
|
||||||
run: |
|
|
||||||
mkdir -p ${{ env.TF_PLUGIN_CACHE_DIR }}
|
|
||||||
pip install -r tests/requirements.txt
|
|
||||||
pytest -vv tests/modules
|
|
||||||
|
|
||||||
fast:
|
fast:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
@ -114,8 +99,4 @@ jobs:
|
||||||
TERRAFORM_VERSION: ${{ env.TERRAFORM_VERSION }}
|
TERRAFORM_VERSION: ${{ env.TERRAFORM_VERSION }}
|
||||||
|
|
||||||
- name: Run tests on FAST stages
|
- name: Run tests on FAST stages
|
||||||
id: pytest
|
run: pytest -vv tests/fast
|
||||||
run: |
|
|
||||||
mkdir -p ${{ env.TF_PLUGIN_CACHE_DIR }}
|
|
||||||
pip install -r tests/requirements.txt
|
|
||||||
pytest -vv tests/fast
|
|
||||||
|
|
Loading…
Reference in New Issue