Moves Posts to MongoDB and implements Micropub #14
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: Run Tests on PR | |
on: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
test: | |
name: Run Tests | |
runs-on: ubuntu-latest | |
env: | |
MONGODB_URI: mongodb://localhost:27017/ | |
DATABASE_NAME: site_db | |
MICROPUB_SECRET: open-sesame | |
FQD: http://localhost:5001 | |
services: | |
mongodb: | |
image: mongo:8 | |
ports: | |
- 27017:27017 | |
options: >- | |
--health-cmd "mongosh --eval 'db.adminCommand(\"ping\")'" | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.x' | |
- name: Install Poetry | |
run: pip install poetry | |
- name: Install Dependencies | |
run: poetry install | |
- name: Run Tests | |
run: poetry run pytest |