Skip to content

Commit

Permalink
Update GHA to run tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Ru Chern Chong committed May 7, 2024
1 parent bea8f2d commit c6aa1ac
Showing 1 changed file with 29 additions and 4 deletions.
33 changes: 29 additions & 4 deletions .github/workflows/Deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,34 @@ on:
- main

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run tests
run: pytest

- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}

deploy:
runs-on: ubuntu-latest
environment: Preview
needs: test
steps:
- name: Checkout code
uses: actions/checkout@v2
Expand Down Expand Up @@ -37,10 +62,10 @@ jobs:
run: |
zip -r deployment_package.zip .
# - name: Deploy to AWS Lambda - Production
# if: env.ENVIRONMENT == 'Production'
# run: |
# aws lambda update-function-code --function-name prod-lta-datasets-updater --zip-file fileb://deployment_package.zip
# - name: Deploy to AWS Lambda - Production
# if: env.ENVIRONMENT == 'Production'
# run: |
# aws lambda update-function-code --function-name prod-lta-datasets-updater --zip-file fileb://deployment_package.zip

- name: Deploy to AWS Lambda - Preview
run: |
Expand Down

0 comments on commit c6aa1ac

Please sign in to comment.