-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (45 loc) · 1.12 KB
/
fly.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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