Skip to content

Commit

Permalink
pythonpackage.yml: on any push or pull_request; cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ickc committed May 12, 2020
1 parent 6ef5d1f commit 73f63a4
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@

name: Python package

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

jobs:
build-n-publish:
Expand All @@ -30,12 +26,12 @@ jobs:
pip install -U pip
pip install wheel
pip install -e .[test]
downloadUrl=$(python -c 'import requests, sys; v = sys.argv[1]; url = "https://api.github.com/repos/jgm/pandoc/releases/" + ("" if v == "latest" else "tags/") + v; print(next(i["browser_download_url"] for i in requests.get(url).json()["assets"] if i["name"][-3:] == "deb"))' ${{ matrix.pandoc-version }}) &&
wget $downloadUrl &&
# pandoc
downloadUrl=$(python -c 'import requests, sys; v = sys.argv[1]; url = "https://api.github.com/repos/jgm/pandoc/releases/" + ("" if v == "latest" else "tags/") + v; print(next(i["browser_download_url"] for i in requests.get(url).json()["assets"] if i["name"][-3:] == "deb"))' ${{ matrix.pandoc-version }})
wget $downloadUrl
sudo dpkg -i ${downloadUrl##*/}
- name: Tests
run: |
make -j3 test
run: make -j3 test
# c.f. https://packaging.python.org/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/
- name: Build a binary wheel and a source tarball
if: ${{ startsWith(github.event.ref, 'refs/tags') && matrix.python-version == 3.8 && matrix.pandoc-version == 'latest' }}
Expand Down

0 comments on commit 73f63a4

Please sign in to comment.