Merge pull request #10 from charalamm/patch-1 #31
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: stac-fastapi-mongo | |
on: | |
push: | |
branches: [ main, dev ] | |
pull_request: | |
branches: [ main, dev ] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
services: | |
mongo_db_service: | |
image: mongo:3.6 | |
env: | |
MONGO_INITDB_ROOT_USERNAME: dev | |
MONGO_INITDB_ROOT_PASSWORD: stac | |
ports: | |
- 27018:27017 | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v2 | |
# Setup Python (faster than using Python container) | |
- name: Setup Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.8" | |
# - name: Lint code | |
# uses: pre-commit/[email protected] | |
- name: Install pipenv | |
run: | | |
python -m pip install --upgrade pipenv wheel | |
- name: Install mongo stac-fastapi | |
run: | | |
pip install ./stac_fastapi/mongo[dev,server] | |
- name: Run test suite | |
run: | | |
cd stac_fastapi/mongo && pipenv run pytest -svvv | |
env: | |
ENVIRONMENT: testing | |
MONGO_USER: dev | |
MONGO_PASS: stac | |
MONGO_PORT: 27018 | |
MONGO_HOST: localhost |