Skip to content

ci: add step names

ci: add step names #31

Workflow file for this run

on:
push:
branches:
- main
env:
AWS_BUCKET_NAME: thumbnail-generator-api
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: "3.9"
cache: 'pip'
- name: Execute unit tests and coverage report
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name:
run: python -m coverage run -m unittest -v tests/*.py
- name:
run: python -m coverage report -m
build-and-deploy:
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v5
with:
python-version: '3.9'
cache: 'pip'
- uses: aws-actions/setup-sam@v1
- 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: ${{ secrets.AWS_REGION }}
# sam build
- run: sam build --use-container
# sam deploy
- run: sam deploy --s3-bucket $AWS_BUCKET_NAME --no-confirm-changeset --no-fail-on-empty-changeset