Skip to content

Changed tests and paths #7

Changed tests and paths

Changed tests and paths #7

Workflow file for this run

name: CI-Tests-New-File
on:
push:
branches:
- main
- develop
pull_request:
branches:
- main
- develop
paths:
# - './**'
- './terraform/**'
- './integration_tests/**'
env:
AWS_DEFAULT_REGION: 'eu-central-1'
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
working-directory: "./"
run: pip install -r requirements.txt
- name: Run Unit tests
working-directory: "./"
run: pytest -vv -s ./tests/
# run: pytest -s .\tests\
- name: Lint
working-directory: "./"
run: pylint --recursive=y .
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ env.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ env.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ env.AWS_DEFAULT_REGION }}
- name: Integration Test
working-directory: 'integraton-tests'
run: |
. run.sh
tf-plan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ env.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ env.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ env.AWS_DEFAULT_REGION }}
- uses: hashicorp/setup-terraform@v1
- name: TF plan
working-directory: 'terraform'
run: |
terraform init -backend-config="key=mlops-zoomcamp-prod.tfstate" --reconfigure && terraform plan -var-file=vars/prod.tfvars