Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add github actions for databuilder #336

Merged
merged 5 commits into from
Aug 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

on: pull_request
jobs:
pre-commit:
runs-on: ubuntu-18.04
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Setup python 3.6
uses: actions/setup-python@v1
with:
python-version: 3.6
test-unit:
runs-on: ubuntu-18.04
strategy:
matrix:
python-version: ['3.6.x', '3.7.x']
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Setup python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: pip3 install -r requirements.txt && pip3 install .[all] && pip3 install codecov
- name: Run python unit tests
run: make test
29 changes: 29 additions & 0 deletions .github/workflows/pypipublish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@

name: Build and Deploy
on:
push:
branches:
- master
tags:
- '*'
jobs:
build-and-publish-python-module:
name: Build and publish python module to pypi
runs-on: ubuntu-18.04
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Setup python 3.6
uses: actions/setup-python@v1
with:
python-version: 3.6
- name: Add wheel dependency
run: pip install wheel
- name: Generate dist
run: python setup.py sdist bdist_wheel
- name: Publish to PyPI
if: startsWith(github.event.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.pypi_password }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to have this working. Where do the secrets come from?

Copy link
Member Author

@feng-tao feng-tao Aug 18, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We got the token from pypi.

22 changes: 0 additions & 22 deletions .travis.yml

This file was deleted.