Skip to content

chore(deps): lock file maintenance #7731

chore(deps): lock file maintenance

chore(deps): lock file maintenance #7731

on: push
name: test endpoints
jobs:
test:
name: test endpoints
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Set up Python 3.10
uses: actions/setup-python@b64ffcaf5b410884ad320a9cfac8866006a109aa # v4.8.0
with:
python-version: '3.10'
- name: Upgrade pip
run: python -m pip install --upgrade pip
- uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3.3.3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install poetry
env:
POETRY_VERSION: "1.7.1"
run: pip install poetry==${POETRY_VERSION} && poetry --version
- name: Install requirements
run: poetry install --with test
- name: Get python version
run: |
python_version=$(python -V | cut -d' ' -f2)
echo "python_version=${python_version}" >> $GITHUB_ENV
- name: Make version file
run: |
printf '__commit_sha__ = "09cfe03100443fb9071bba88d5c8775ff54a9ebc"\n__time__ = "2022-07-25:15:11:05"\n' > version.py
cp version.py "${{ github.workspace }}/app/"
- name: Copy site-packages in workspace
working-directory: ${{ github.workspace }}
shell: bash
run: |
mkdir -p "${{ github.workspace }}/env/" && cp -fR $(poetry env list | poetry env info -p)/lib/python3.10/site-packages "${{ github.workspace }}/env/"
- name: Install development .env file
working-directory: ${{ github.workspace }}
shell: bash
run: |
cp -f .env.example .env
- name: set PYTHONPATH
run: |
echo "PYTHONPATH=/github/workspace/env/site-packages:${{ env.PYTHONPATH}}" >> $GITHUB_ENV
- name: Checks for new endpoints against AWS WAF rules
uses: cds-snc/notification-utils/.github/actions/waffles@52.2.2
with:
app-loc: '/github/workspace'
app-libs: '/github/workspace/env/site-packages'
flask-mod: 'application'
flask-prop: 'application'
base-url: 'https://staging.notification.cdssandbox.xyz'