Skip to content

Styling tweaks and generating random code - static #17

Styling tweaks and generating random code - static

Styling tweaks and generating random code - static #17

name: CI/CD Pipeline
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout head
uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: "3.9"
- name: Test with unittest
run: |
cd server
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements-test.txt
cd ..
python -m unittest
- name: AWS build and deploy
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: eu-west-2
- run: cd server && sam build && cd .aws-sam/build/FlatiniFunction && rm -fr clean-build.sh samconfig.toml template.yaml requirements.txt requirements-test.txt tests
- run: cd server && sam deploy --no-fail-on-empty-changeset --no-confirm-changeset --stack-name flatini-api-prod --s3-bucket flatini-api-prod-s3 --region eu-west-2 --capabilities CAPABILITY_IAM --parameter-overrides ${{ secrets.SAM_PARAMETER_OVERRIDES }}