Skip to content

update to use secret #7

update to use secret

update to use secret #7

Workflow file for this run

name: Python Tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
container: python:3.8-slim
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run tests
env:
AWS_DEFAULT_REGION: ap-southeast-1
run: |
python -m unittest discover -v -s ./test
deploy:
runs-on: ubuntu-latest
needs: test
steps:
- name: Deploy with cloudformation
run: |
aws cloudformation package --template-file template.yaml --output-template-file serverless-output.yaml --s3-bucket ${{ secrets.AWS_S3_BUCKET }}
aws cloudformation deploy --template-file serverless-output.yaml --stack-name ${{ secrets.STACK_NAME }} --capabilities CAPABILITY_NAMED_IAM --no-execute-changeset