chore(deps): bump actions/upload-artifact from 4.4.0 to 4.4.3 #65
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
# This workflow will install Python dependencies, run tests and lint with a single version of Python | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: PR - Serverless Service CI/CD | |
permissions: | |
contents: read | |
env: | |
NODE_VERSION: "20" | |
PYTHON_VERSION: "3.12" | |
AWS_REGION: "us-east-1" | |
on: | |
workflow_dispatch: | |
pull_request: | |
branches: [main] | |
jobs: | |
quality_standards: | |
runs-on: ubuntu-latest | |
steps: | |
- run: | | |
echo "🎉 The job was automatically triggered by a ${{ env.EVENT_NAME }} event." >> $GITHUB_STEP_SUMMARY | |
echo "🐧 This job is now running on a ${{ env.OS_NAME }} ${{env.OS_ARCH}} server hosted by GitHub!" >> $GITHUB_STEP_SUMMARY | |
echo "🔎 The name of your branch is ${{ env.BRANCH_NAME }} and your repository is ${{ env.REPO_NAME }}." >> $GITHUB_STEP_SUMMARY | |
env: | |
EVENT_NAME: ${{ github.event_name}} | |
OS_NAME: ${{ runner.os }} | |
OS_ARCH: ${{runner.arch }} | |
BRANCH_NAME: ${{ github.ref }} | |
REPO_NAME: ${{ github.repository }} | |
- name: Check out repository code | |
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
- name: Install poetry | |
run: pipx install poetry | |
- name: Set up Python | |
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
cache: "poetry" # NOTE: poetry must be installed before this step, or else cache doesn't work | |
- name: Install dependencies | |
run: make dev | |
- name: pre commit | |
run: make pre-commit | |
- name: Formatting and Linting | |
run: make lint | |
- name: Complexity scan | |
run: make complex | |
tests: | |
needs: quality_standards | |
runs-on: ubuntu-latest | |
environment: dev | |
permissions: | |
id-token: write # required for requesting the JWT (GitHub OIDC) | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
- name: Install poetry | |
run: pipx install poetry | |
- name: Set up Python | |
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
cache: "poetry" # NOTE: poetry must be installed before this step, or else cache doesn't work | |
- name: Set up Node | |
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
cache: "npm" | |
- name: Install dependencies | |
run: make dev | |
- name: Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2 | |
with: | |
role-to-assume: ${{ secrets.AWS_ROLE }} | |
role-session-name: ${{ env.SESSION_NAME }} | |
aws-region: ${{ env.AWS_REGION }} | |
env: | |
SESSION_NAME: "github-${{github.sha}}-dev" | |
- name: Unit tests | |
run: make unit | |
- name: Infrastructure tests | |
run: make infra-tests | |
- name: Deploy to AWS | |
run: make deploy | |
- name: Code coverage tests | |
run: make coverage-tests | |
- name: Codecov | |
uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4.5.0 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: ./coverage.xml | |
fail_ci_if_error: yes # optional (default = false) | |
verbose: yes # optional (default = false) | |
- name: Destroy stack | |
if: always() | |
run: make destroy |