Add timezone to function #12
Workflow file for this run
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: Preview Deployment | |
on: | |
push: | |
branches: | |
- "*" | |
- "!main" | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
environment: Preview | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.12 | |
cache: 'pip' | |
- run: pip install -r requirements.txt | |
- name: Run tests | |
run: pytest | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
deploy: | |
runs-on: ubuntu-latest | |
environment: Preview | |
needs: test | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.12 | |
cache: 'pip' | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-region: ${{ vars.AWS_REGION }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
- name: Create Package for AWS Lambda Layer | |
run: | | |
python -m venv python | |
source python/bin/activate | |
pip install -r requirements.txt | |
zip -r package.zip python/lib/python3.12/site-packages -x "**/pulumi*/*" "**/pip*/*" "**/pytest*/*" | |
- uses: pulumi/actions@v5 | |
with: | |
command: up | |
stack-name: staging | |
env: | |
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} | |
# - 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 | |
# run: | | |
# aws lambda update-function-code --function-name dev-lta-datasets-updater --zip-file fileb://deployment_package.zip |