Skip to content

Commit

Permalink
github: add actions to replace travis
Browse files Browse the repository at this point in the history
  • Loading branch information
drjova committed Nov 26, 2020
1 parent 0dfc061 commit b995fa7
Showing 1 changed file with 62 additions and 0 deletions.
62 changes: 62 additions & 0 deletions .github/workflows/build-and-release.yml
@@ -0,0 +1,62 @@
name: Build and release

on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
Test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [2.7, 3.6]

steps:
- name: Checkout
uses: actions/checkout@v2
with:
python-version: ${{ matrix.python-version }}
fetch-depth: 0

- name: Setup nodejs
uses: actions/setup-node@v1
with:
node-version: 10.14.0

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

- name: Install npm dependencies
run: |
npm install buffer-shims
npm install --global rollup
- name: Install python dependencies
run: |
python -m pip install --upgrade pip
pip install -e .[tests,docs]
- name: Show python dependencies
run: |
pip freeze
- name: Run tests
run: |
./run-tests.sh
- name: Publish package
if: ${{ success() && github.event_name == 'push' && matrix.python-version == '2.7' }}
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.pypi_password }}

- name: Run build npm package
if: ${{ success() && github.event_name == 'push' && matrix.python-version == '2.7' }}
working-directory: .
run: |
./build-npm-package.sh

0 comments on commit b995fa7

Please sign in to comment.