Skip to content

Commit

Permalink
Merge pull request #150 from adsabs/add_github_actions
Browse files Browse the repository at this point in the history
Add github actions as CI
  • Loading branch information
nemanjamart committed Feb 11, 2021
2 parents ad2243c + 1be2228 commit 6686aab
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 3 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/python_actions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Python CI actions

on: [pull_request]
env:
PGDATABASE: metrics
PGPASSWORD: postgres
PGUSER: postgres
PGHOST: localhost
PGPORT: 5432

jobs:
build:

runs-on: ubuntu-latest
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}

services:
postgres:
image: postgres:9.6
env:
POSTGRES_DB: metrics
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
POSTGRES_HOST: localhost
POSTGRES_PORT: 5432

ports:
- 5432:5432
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 2.7

- name: Install dependencies
run: |
python -m pip install --upgrade wheel setuptools pip
pip install -U -r requirements.txt
pip install -U -r dev-requirements.txt
- name: Test with pytest
run: |
py.test
- name: Coveralls
run: coveralls
6 changes: 3 additions & 3 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pytest==4.6.9
coveralls==1.1.0
coveralls==1.8.2
mock==1.3.0
coverage==5.1
coverage==4.5.4
pytest-cov==2.8.1
testing.postgresql==1.3.0
testing.postgresql==1.3.0

0 comments on commit 6686aab

Please sign in to comment.