-
Notifications
You must be signed in to change notification settings - Fork 20
84 lines (72 loc) · 2.01 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
83
84
name: CI
on:
push:
branches:
- master
pull_request:
jobs:
terraform-versions:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Terraform min/max versions
id: versions
uses: clowdhaus/terraform-min-max@v1.2.7
outputs:
min: ${{ steps.versions.outputs.minVersion }}
max: ${{ steps.versions.outputs.maxVersion }}
pre-commit:
needs: terraform-versions
runs-on: ubuntu-latest
strategy:
matrix:
terraform-version:
- ${{ needs.terraform-versions.outputs.min }}
- ${{ needs.terraform-versions.outputs.max }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Run pre-commit
uses: clowdhaus/terraform-composite-actions/pre-commit@main
with:
terraform-version: ${{ matrix.terraform-version }}
pre-commit-success:
needs: pre-commit
runs-on: ubuntu-latest
steps:
- run: echo OK
lint-python:
runs-on: ubuntu-latest
steps:
- name: Setup python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: pip install --pre flake8==4.0.1 black==22.3.0
- uses: actions/checkout@v4
- run: flake8
- run: black --check .
test-python:
runs-on: ubuntu-latest
env:
AWS_DEFAULT_REGION: eu-west-1
strategy:
fail-fast: false
matrix:
lambda:
- notifier
steps:
- name: Setup python
uses: actions/setup-python@v2
with:
python-version: 3.8
# Keep boto version in sync with what is installed inside of the Python
# 3.8 lambda. See the link below for reference.
# https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html
- name: Install dependencies
run: pip install boto3==1.20.32 botocore==1.23.32
- uses: actions/checkout@v4
- run: python -m tests
working-directory: lambdas/${{ matrix.lambda }}