Prevent state drift changes across different operating systems when n… #139
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: | |
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 }} |