Merge pull request #41 from spoo-me/40-optimize-ip-existence-check-in… #82
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: 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 |