Skip to content

Add support for Cosmetology public search #261

Add support for Cosmetology public search

Add support for Cosmetology public search #261

name: Check-Cosmetology-Application
on:
pull_request:
paths:
- backend/cosmetology-app/**
env:
AWS_REGION : "us-east-1"
# Permission can be added at job level or workflow level
permissions:
id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout
jobs:
LintPython:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v6
with:
python-version: '3.14'
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v5
- name: Upgrade pip
# Runner image ships pip 25.3; upgrade to 26.0+ so pip-audit passes (CVE-2026-1703 fixed in 26.0)
run: pip install --upgrade 'pip>=26.0'
- name: Install dev dependencies
run: "pip install -r backend/cosmetology-app/requirements-dev.txt"
- name: Lint Code
run: "cd backend/cosmetology-app; ruff check $(git ls-files '*.py')"
- name: Check Dependencies
run: "pip-audit"
LintNode:
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v5
- run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner."
- run: echo "🖥️ The workflow is now ready to test your code on the runner."
# Setup Node
- name: Setup Node
uses: actions/setup-node@v6
with:
node-version: '24.11.1'
# Use any cached yarn dependencies (saves build time)
- uses: actions/cache@v4
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
# Install Yarn Dependencies
- name: Install Node.js dependencies
run: yarn install
working-directory: ./backend/cosmetology-app/lambdas/nodejs
# Run Linter Checks
- name: Run linter
run: yarn run lint
working-directory: ./backend/cosmetology-app/lambdas/nodejs
# Audit dependencies for vulnerabilities
- name: Audit dependencies
run: yarn run audit:dependencies
working-directory: ./backend/cosmetology-app/lambdas/nodejs
TestApp:
runs-on: ubuntu-latest
steps:
# Checks-out the repository under $GITHUB_WORKSPACE
- uses: actions/checkout@v5
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: '3.14'
- name: Upgrade pip
# Runner image ships pip 25.3; upgrade to 26.0+ so pip-audit passes (CVE-2026-1703 fixed in 26.0)
run: pip install --upgrade 'pip>=26.0'
# Setup Node
- name: Setup Node
uses: actions/setup-node@v6
with:
node-version: '24.11.1'
# Use any cached yarn dependencies (saves build time)
- uses: actions/cache@v4
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
# Install Yarn Dependencies
- name: Install Node.js dependencies
run: yarn install
working-directory: ./backend/cosmetology-app/lambdas/nodejs
- name: Install dev dependencies
run: "pip install -r backend/cosmetology-app/requirements-dev.txt"
- name: Install all Python dependencies
run: "cd backend/cosmetology-app; bin/sync_deps.sh"
- name: Test backend
run: "cd backend/cosmetology-app; bin/run_tests.sh -l all -no"