CI #369
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
name: CI | |
on: | |
push: | |
pull_request: | |
schedule: | |
- cron: '0 18 * * SUN' | |
jobs: | |
lint: | |
name: Terraform validate ${{ matrix.terraform_version }} | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
terraform_version: | |
- latest | |
- 1.2.9 | |
- 1.1.9 | |
steps: | |
- uses: actions/checkout@master | |
- uses: hashicorp/setup-terraform@v2 | |
with: | |
terraform_version: "${{ matrix.terraform_version }}" | |
- name: Terraform version | |
id: version | |
run: terraform version | |
- name: Terraform fmt | |
id: fmt | |
run: terraform fmt -check | |
continue-on-error: true | |
- name: Terraform init | |
id: init | |
run: terraform init | |
- name: Terraform Validate | |
id: validate | |
run: terraform validate -no-color | |
pythontest: | |
name: ${{ matrix.config.toxenv }} | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- toxenv: py37 | |
python-version: 3.7 | |
- toxenv: py38 | |
python-version: 3.8 | |
- toxenv: py39 | |
python-version: 3.9 | |
- toxenv: py310 | |
python-version: '3.10' | |
# - toxenv: py311 | |
# python-version: 3.11 | |
- toxenv: flake8 | |
python-version: 3.8 | |
- toxenv: pylint | |
python-version: 3.8 | |
- toxenv: black | |
python-version: 3.8 | |
- toxenv: mypy | |
python-version: 3.8 | |
- toxenv: pytest | |
python-version: 3.8 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Python version | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.config.python-version }} | |
- name: Install dependencies | |
run: python -m pip install tox==3.20.0 | |
- name: Python test | |
run: tox | |
env: | |
TOXENV: "${{ matrix.config.toxenv }}" |