Skip to content

Add unit tests for token verification in security service #3

Add unit tests for token verification in security service

Add unit tests for token verification in security service #3

Workflow file for this run

name: PR Checks
on:
pull_request:
paths:
- "app/**"
- "app/tests/**"
jobs:
Lint-Flake8:
uses: software-architecture-fiap/lint-flake8-workflow/.github/workflows/lint-flake8-pr-changed-files.yml@main
Unit-Test:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.10.13
- name: Install Poetry and add to PATH
run: |
curl -sSL https://install.python-poetry.org | python3 -
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Cache dependencies
uses: actions/cache@v3
with:
path: |
~/.cache/pypoetry
~/.virtualenvs
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
${{ runner.os }}-poetry-
- name: Install Dependencies
run: |
poetry add pytest-cov --dev
poetry install --no-interaction --no-root
- name: Check Poetry environment
run: poetry show --tree
- name: Run tests
run: poetry run pytest