Skip to content

Api tests

Api tests #1

Workflow file for this run

name: API Tests
on:
push:
paths:
- 'tests/api/**'
- '.github/workflows/api-tests.yml'
pull_request:
paths:
- 'tests/api/**'
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest requests
- name: Run tests
env:
API_TOKEN: ${{ secrets.GITEA_API_TOKEN }}
run: |
echo "BASE_URL = 'http://52.211.112.5:3000/'" > config.py
echo "API_TOKEN = '${API_TOKEN}'" >> config.py
pytest tests/api -v