Order matters? #114
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: Fly Deploy | |
on: | |
push: | |
branches: | |
- main | |
env: | |
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} | |
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 | |
deploy: | |
name: Deploy app | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: superfly/flyctl-actions/setup-flyctl@master | |
- run: flyctl deploy --remote-only |