summaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authorAlex Grönholm <alex.gronholm@nextday.fi>2020-01-07 18:13:36 +0200
committerAlex Grönholm <alex.gronholm@nextday.fi>2020-01-22 08:40:15 +0200
commitcde5f209045614b833d432718d62bcbac0784a90 (patch)
treeee3b90e427239cef265e5b4256a3af13f682333a /.github/workflows
parent502747cf1ff773ba52dd8c61b04ca93d1453db32 (diff)
downloadwheel-git-cde5f209045614b833d432718d62bcbac0784a90.tar.gz
Replaced Travis with Github Actions
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/codeqa-test-tag.yml57
-rw-r--r--.github/workflows/publish.yml24
2 files changed, 81 insertions, 0 deletions
diff --git a/.github/workflows/codeqa-test-tag.yml b/.github/workflows/codeqa-test-tag.yml
new file mode 100644
index 0000000..633eeca
--- /dev/null
+++ b/.github/workflows/codeqa-test-tag.yml
@@ -0,0 +1,57 @@
+name: Python codeqa/test/tag
+
+on: [push]
+
+jobs:
+ flake8:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v1
+ - name: Check code style with Flake8
+ uses: TrueBrain/actions-flake8@v1.2
+ with:
+ path: wheel tests
+
+ test:
+ needs: [flake8]
+ strategy:
+ fail-fast: false
+ matrix:
+ os: [ubuntu-latest, macos-latest, windows-latest]
+ python-version: [2.7, 3.5, 3.6, 3.8, pypy3]
+ exclude:
+ - os: ubuntu-latest
+ python-version: 3.6
+ - os: macos-latest
+ python-version: 3.6
+ - os: macos-latest
+ python-version: pypy3
+ - os: windows-latest
+ python-version: 2.7
+ - os: windows-latest
+ python-version: 3.5
+ - os: windows-latest
+ python-version: pypy3
+ runs-on: ${{ matrix.os }}
+ steps:
+ - uses: actions/checkout@v1
+ - name: Set up Python ${{ matrix.python-version }}
+ uses: actions/setup-python@v1
+ with:
+ python-version: ${{ matrix.python-version }}
+ - name: Install dependencies
+ run: pip install .[test]
+ - name: Test with pytest
+ run: pytest
+
+ tag:
+ runs-on: ubuntu-latest
+ needs: test
+ if: github.ref == 'refs/heads/master'
+ steps:
+ - uses: actions/checkout@v1
+ - uses: agronholm/action-general-autotag@regexnofail
+ with:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ source_file: docs/news.rst
+ extraction_regex: "\\*\\*(\\d+\\.\\d+\\.\\d+(?:(?:a|b|rc)\\d+)?) "
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
new file mode 100644
index 0000000..539854f
--- /dev/null
+++ b/.github/workflows/publish.yml
@@ -0,0 +1,24 @@
+name: Publish packages to PyPI
+
+on:
+ push:
+ tags:
+ - "*"
+
+jobs:
+ publish:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v1
+ - name: Set up Python
+ uses: actions/setup-python@v1
+ with:
+ python-version: 3.x
+ - name: Install dependencies
+ run: pip install pep517
+ - name: Create packages
+ run: python -m pep517.build --source --binary --out-dir dist/
+ - name: Upload packages
+ uses: pypa/gh-action-pypi-publish@v1.0.0a0
+ with:
+ password: ${{ secrets.pypi_password }}