Feature/auth refactor and tests #11
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: Pull Request | |
on: pull_request | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
- name: Load env vars | |
run: | | |
cat cicd/env > .env | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.12.3 | |
cache: 'pip' | |
- name: Cache dependencies | |
id: cache-dependencies | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cache/pip | |
~/.local/lib/python3.12/site-packages | |
key: ${{ runner.os }}-pip-${{ hashFiles('./requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
- name: Start docker containers | |
run: | | |
docker compose -f cicd/docker-compose.yml up -d | |
- name: Run the tests | |
run: | | |
pip install tox | |
tox -e py | |
- name: Stop docker containers | |
if: always() | |
run: | | |
docker compose -f cicd/docker-compose.yml down -v |