-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #150 from adsabs/add_github_actions
Add github actions as CI
- Loading branch information
Showing
2 changed files
with
57 additions
and
3 deletions.
There are no files selected for viewing
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
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 |
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
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 |