Skip to content

Merge pull request #41 from spoo-me/40-optimize-ip-existence-check-in… #82

Merge pull request #41 from spoo-me/40-optimize-ip-existence-check-in…

Merge pull request #41 from spoo-me/40-optimize-ip-existence-check-in… #82

Workflow file for this run

name: API Test
on:
push:
branches:
- main
paths:
- '**.py'
jobs:
test-api:
runs-on: ubuntu-latest
env:
MONGODB_URI: ${{ secrets.MONGODB_URI }}
URL_REPORT_WEBHOOK : ${{ secrets.URL_REPORT_WEBHOOK }}
CONTACT_WEBHOOK : ${{ secrets.CONTACT_WEBHOOK }}
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: |
pip install -r requirements.txt
- name: Start Flask server
run: python main.py &
- name: Wait for server to start
run: sleep 3
- name: Run API test
run: python tests/shorten.py
- name: Run Stats test
run: python tests/stats.py