Skip to content

Commit

Permalink
Set up CI on GitHub Actions (#115)
Browse files Browse the repository at this point in the history
* Set up GitHub Actions

* Explicit utf-8 in render_templates

* Build status badges

* Combine OSes into single workflow

* Remove .travis.yml
  • Loading branch information
jayqi authored Jun 25, 2020
1 parent 3131c5c commit b9fc9f6
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 45 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: tests

on:
push:
branches: [ master ]
pull_request:
schedule:
# Run every Sunday
- cron: '0 0 * * 0'

jobs:
build:
name: ${{ matrix.os }}, Python ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [3.6, 3.7, 3.8]
os: [ubuntu-latest, macos-latest, windows-latest]

steps:

- uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r dev-requirements.txt
- name: Lint and Test Package
run: |
make test
- name: Test Building Docs
run: |
make examples
make docs
42 changes: 0 additions & 42 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<a href="http://deon.drivendata.org/"><img src="https://s3.amazonaws.com/drivendata-public-assets/deon.png" width=200/></a>

[![Build Status](https://travis-ci.org/drivendataorg/deon.svg?branch=master)](https://travis-ci.org/drivendataorg/deon) [![PyPI](https://img.shields.io/pypi/v/deon.svg)](https://pypi.org/project/deon/) [![Conda Version](https://img.shields.io/conda/vn/conda-forge/deon.svg)](https://anaconda.org/conda-forge/deon)
[![tests](https://github.com/drivendataorg/deon/workflows/tests/badge.svg?branch=master)](https://github.com/drivendataorg/deon/actions?query=workflow%3A%22tests%22+branch%3Amaster) [![PyPI](https://img.shields.io/pypi/v/deon.svg)](https://pypi.org/project/deon/) [![Conda Version](https://img.shields.io/conda/vn/conda-forge/deon.svg)](https://anaconda.org/conda-forge/deon)

> [Read more about `deon` on the project homepage](http://deon.drivendata.org/)
Expand Down
2 changes: 1 addition & 1 deletion docs/md_templates/readme.tpl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<a href="http://deon.drivendata.org/"><img src="https://s3.amazonaws.com/drivendata-public-assets/deon.png" width=200/></a>

[![Build Status](https://travis-ci.org/drivendataorg/deon.svg?branch=master)](https://travis-ci.org/drivendataorg/deon) [![PyPI](https://img.shields.io/pypi/v/deon.svg)](https://pypi.org/project/deon/) [![Conda Version](https://img.shields.io/conda/vn/conda-forge/deon.svg)](https://anaconda.org/conda-forge/deon)
[![tests](https://github.com/drivendataorg/deon/workflows/tests/badge.svg?branch=master)](https://github.com/drivendataorg/deon/actions?query=workflow%3A%22tests%22+branch%3Amaster) [![PyPI](https://img.shields.io/pypi/v/deon.svg)](https://pypi.org/project/deon/) [![Conda Version](https://img.shields.io/conda/vn/conda-forge/deon.svg)](https://anaconda.org/conda-forge/deon)

> [Read more about `deon` on the project homepage](http://deon.drivendata.org/)

Expand Down
2 changes: 1 addition & 1 deletion docs/render_templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def main():
for t, o in TEMPLATE_AND_OUTPUT.items():
tmpl = env.get_template(t)

with open(o, "w") as f:
with open(o, "w", encoding="utf-8") as f:
(tmpl.stream(**ctx).dump(f))


Expand Down

0 comments on commit b9fc9f6

Please sign in to comment.