Merge pull request #8 from Som-Energia/IMP_remove_repeated_records_fr… #169
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: CI | |
on: | |
push: # git push | |
pull_request: # PR | |
workflow_dispatch: # manual | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
TRAVIS: 'true' # Skip tests requiring data | |
MONGO_URI: 'mongodb://localhost:27017/heman' | |
SENTRY_REDIS_HOST: http://localhost:6379 | |
#SENTRY_DSN: 'http://localhost:6379' | |
services: | |
redis: | |
image: redis | |
ports: | |
- 6379:6379 | |
#options: --entrypoint redis-server | |
sentry: | |
image: sentry | |
ports: | |
- 8099:80 | |
mongo: | |
image: mongo | |
ports: | |
- 27017:27017 | |
strategy: | |
matrix: | |
python-version: | |
- '2.7' # production | |
#- '3.9' | |
mongodb-version: | |
- 2 | |
redis-version: | |
- 6 | |
name: Python ${{ matrix.python-version }} | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
if [ "${{ matrix.python-version }}" = "2.7" ] | |
then | |
pip install -r requirements.txt # needed to use empowering and amoniak from git not from pypi | |
./setup.py develop | |
else | |
pip install "setuptools<58" # use_2to3 dropped, in pymongo indirect flask-pymongo. Should be installed before requirements.txt | |
pip install -r requirements-py3.txt # needed to use empowering and amoniak from git not from pypi | |
./setup.py develop | |
fi | |
- uses: BSFishy/pip-action@v1 | |
with: | |
packages: | | |
coveralls | |
- name: Unit tests | |
run: | | |
pytest | |
- name: Coveralls | |
uses: AndreMiras/coveralls-python-action@develop | |
with: | |
parallel: true | |
flag-name: Unit tests | |
coveralls_finish: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Coveralls Finished | |
uses: AndreMiras/coveralls-python-action@develop | |
with: | |
parallel-finished: true |