Merge pull request #624 from GoogleCloudPlatform/jccb/merge-tests
Move FAST tests to main tests workflow
This commit is contained in:
commit
df1129774d
|
@ -1,55 +0,0 @@
|
||||||
# Copyright 2022 Google LLC
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
# you may not use this file except in compliance with the License.
|
|
||||||
# You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
|
|
||||||
name: "FAST Tests"
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
branches:
|
|
||||||
- fast-dev
|
|
||||||
- fast-dev-gke
|
|
||||||
- master
|
|
||||||
# paths:
|
|
||||||
# - 'modules/**'
|
|
||||||
# - 'fast/stages/**'
|
|
||||||
# - 'tests/fast/**'
|
|
||||||
tags:
|
|
||||||
- ci
|
|
||||||
- test
|
|
||||||
|
|
||||||
env:
|
|
||||||
TF_PLUGIN_CACHE_DIR: "/home/runner/.terraform.d/plugin-cache"
|
|
||||||
GOOGLE_APPLICATION_CREDENTIALS: "/home/runner/credentials.json"
|
|
||||||
PYTEST_ADDOPTS: "--color=yes"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
all-fast-tests:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Config auth
|
|
||||||
run: |
|
|
||||||
echo '{"type": "service_account", "project_id": "test-only"}' \
|
|
||||||
| tee -a $GOOGLE_APPLICATION_CREDENTIALS
|
|
||||||
|
|
||||||
- name: Set up Python
|
|
||||||
uses: actions/setup-python@v2
|
|
||||||
with:
|
|
||||||
python-version: "3.9"
|
|
||||||
|
|
||||||
- name: Run tests on FAST stages
|
|
||||||
run: |
|
|
||||||
mkdir -p ${{ env.TF_PLUGIN_CACHE_DIR }}
|
|
||||||
pip install -r tests/requirements.txt
|
|
||||||
pytest -vv tests/fast
|
|
|
@ -26,9 +26,11 @@ on:
|
||||||
- test
|
- test
|
||||||
|
|
||||||
env:
|
env:
|
||||||
TF_PLUGIN_CACHE_DIR: "/home/runner/.terraform.d/plugin-cache"
|
|
||||||
GOOGLE_APPLICATION_CREDENTIALS: "/home/runner/credentials.json"
|
GOOGLE_APPLICATION_CREDENTIALS: "/home/runner/credentials.json"
|
||||||
PYTEST_ADDOPTS: "--color=yes"
|
PYTEST_ADDOPTS: "--color=yes"
|
||||||
|
PYTHON_VERSION: 3.9
|
||||||
|
TF_PLUGIN_CACHE_DIR: "/home/runner/.terraform.d/plugin-cache"
|
||||||
|
TF_VERSION: 1.1.8
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
doc-examples:
|
doc-examples:
|
||||||
|
@ -44,9 +46,10 @@ jobs:
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v2
|
uses: actions/setup-python@v2
|
||||||
with:
|
with:
|
||||||
python-version: "3.9"
|
python-version: ${{ env.PYTHON_VERSION }}
|
||||||
|
|
||||||
- name: Run tests on documentation examples
|
- name: Run tests on documentation examples
|
||||||
|
id: pytest
|
||||||
run: |
|
run: |
|
||||||
mkdir -p ${{ env.TF_PLUGIN_CACHE_DIR }}
|
mkdir -p ${{ env.TF_PLUGIN_CACHE_DIR }}
|
||||||
pip install -r tests/requirements.txt
|
pip install -r tests/requirements.txt
|
||||||
|
@ -65,15 +68,16 @@ jobs:
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v2
|
uses: actions/setup-python@v2
|
||||||
with:
|
with:
|
||||||
python-version: "3.9"
|
python-version: ${{ env.PYTHON_VERSION }}
|
||||||
|
|
||||||
- name: Set up Terraform
|
- name: Set up Terraform
|
||||||
uses: hashicorp/setup-terraform@v1
|
uses: hashicorp/setup-terraform@v1
|
||||||
with:
|
with:
|
||||||
terraform_version: 1.1.4
|
terraform_version: ${{ env.TF_VERSION }}
|
||||||
terraform_wrapper: false
|
terraform_wrapper: false
|
||||||
|
|
||||||
- name: Run tests environments
|
- name: Run tests environments
|
||||||
|
id: pytest
|
||||||
run: |
|
run: |
|
||||||
mkdir -p ${{ env.TF_PLUGIN_CACHE_DIR }}
|
mkdir -p ${{ env.TF_PLUGIN_CACHE_DIR }}
|
||||||
pip install -r tests/requirements.txt
|
pip install -r tests/requirements.txt
|
||||||
|
@ -92,16 +96,45 @@ jobs:
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v2
|
uses: actions/setup-python@v2
|
||||||
with:
|
with:
|
||||||
python-version: "3.9"
|
python-version: ${{ env.PYTHON_VERSION }}
|
||||||
|
|
||||||
- name: Set up Terraform
|
- name: Set up Terraform
|
||||||
uses: hashicorp/setup-terraform@v1
|
uses: hashicorp/setup-terraform@v1
|
||||||
with:
|
with:
|
||||||
terraform_version: 1.1.4
|
terraform_version: ${{ env.TF_VERSION }}
|
||||||
terraform_wrapper: false
|
terraform_wrapper: false
|
||||||
|
|
||||||
- name: Run tests modules
|
- name: Run tests modules
|
||||||
|
id: pytest
|
||||||
run: |
|
run: |
|
||||||
mkdir -p ${{ env.TF_PLUGIN_CACHE_DIR }}
|
mkdir -p ${{ env.TF_PLUGIN_CACHE_DIR }}
|
||||||
pip install -r tests/requirements.txt
|
pip install -r tests/requirements.txt
|
||||||
pytest -vv tests/modules
|
pytest -vv tests/modules
|
||||||
|
|
||||||
|
fast:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Config auth
|
||||||
|
run: |
|
||||||
|
echo '{"type": "service_account", "project_id": "test-only"}' \
|
||||||
|
| tee -a $GOOGLE_APPLICATION_CREDENTIALS
|
||||||
|
|
||||||
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@v2
|
||||||
|
with:
|
||||||
|
python-version: ${{ env.PYTHON_VERSION }}
|
||||||
|
|
||||||
|
- name: Set up Terraform
|
||||||
|
uses: hashicorp/setup-terraform@v1
|
||||||
|
with:
|
||||||
|
terraform_version: ${{ env.TF_VERSION }}
|
||||||
|
terraform_wrapper: false
|
||||||
|
|
||||||
|
- name: Run tests on FAST stages
|
||||||
|
id: pytest
|
||||||
|
run: |
|
||||||
|
mkdir -p ${{ env.TF_PLUGIN_CACHE_DIR }}
|
||||||
|
pip install -r tests/requirements.txt
|
||||||
|
pytest -vv tests/fast
|
||||||
|
|
Loading…
Reference in New Issue