Restructure: Move sentiment to another package and rename #105
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Python application test with Github Actions | |
on: | |
push: | |
branches: | |
- '**' | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
- uses: aws-actions/setup-sam@v2 | |
- name: Install dependencies | |
run: | | |
make install | |
- name: Lint | |
run: | | |
make lint | |
- name: Test with pytest | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
run: | | |
make test | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: us-east-2 | |
- name: Configure AWS CodeArtifact | |
run: | | |
aws codeartifact login --tool twine --domain your-domain --domain-owner $(aws sts get-caller-identity --query 'Account' --output text) --repository your-repository | |
- name: Build package | |
run: make build-package | |
- name: Publish package | |
run: make publish-package | |
- name: SAM build | |
if: success() | |
env: | |
AWS_SAM_STACK_NAME: ${{ secrets.AWS_SAM_STACK_NAME }} | |
run: | | |
make build-sam | |
- name: SAM deploy | |
if: success() | |
env: | |
AWS_SAM_STACK_NAME: ${{ secrets.AWS_SAM_STACK_NAME }} | |
run: | | |
make deploy-sam |