-
Notifications
You must be signed in to change notification settings - Fork 71
82 lines (75 loc) · 1.95 KB
/
CI.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
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 }}"