Skip to content

GTC-2965 Enable analysis on lists with geostore IDs #365

GTC-2965 Enable analysis on lists with geostore IDs

GTC-2965 Enable analysis on lists with geostore IDs #365

name: Run tests and apply terraform changes for current branch
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up Python 3.10
uses: actions/setup-python@v1
with:
python-version: '3.10'
- name: Lint with flake8
run: |
pip install flake8
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Build container and lambda layers
run: |
./scripts/cibuild
- name: Test with pytest
env:
ENV: test
AWS_ACCESS_KEY_ID: ${{ secrets.aws_key_dev }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.aws_secret_dev }}
AWS_REGION: ${{ secrets.aws_region_dev }}
AWS_XRAY_SDK_ENABLED: false
AWS_REQUEST_PAYER: requester
run: |
./scripts/test -b ${{github.ref}} -k ${{ secrets.aws_key_dev }} -s ${{ secrets.aws_secret_dev }}
- name: Run CodeCOV action
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: tests/cobertura.xml
flags: unittests
name: codecov-umbrella
fail_ci_if_error: false
verbose: false
- name: Deploy production
if: success() && contains(github.ref, 'master')
env:
ENV: production
AWS_ACCESS_KEY_ID: ${{ secrets.aws_key_production }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.aws_secret_production }}
AWS_REGION: ${{ secrets.aws_region_production }}
run: |
./scripts/infra plan -w ${{ github.ref }}
./scripts/infra apply
- name: Deploy staging
if: success() && contains(github.ref, 'develop')
env:
ENV: staging
AWS_ACCESS_KEY_ID: ${{ secrets.aws_key_staging }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.aws_secret_staging }}
AWS_REGION: ${{ secrets.aws_region_staging }}
run: |
./scripts/infra plan -w ${{ github.ref }}
./scripts/infra apply
- name: Deploy dev
if: success() && (! contains(github.ref, 'develop')) && (! contains(github.ref, 'master'))
env:
ENV: dev
AWS_ACCESS_KEY_ID: ${{ secrets.aws_key_dev }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.aws_secret_dev }}
AWS_REGION: ${{ secrets.aws_region_dev }}
run: |
./scripts/infra plan -w ${{ github.ref }}
./scripts/infra apply