-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
249 additions
and
241 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Checks | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
checks: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
include: | ||
- python-version: 3 | ||
env: | ||
TOXENV: flake8 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Run check | ||
env: ${{ matrix.env }} | ||
run: | | ||
pip install -U pip | ||
pip install -U tox | ||
tox |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
name: Freeze, Release & Publish | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
freeze: | ||
name: "Freeze: ${{ matrix.os }}" | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.9 | ||
|
||
- name: Install tox | ||
run: pip install tox | ||
|
||
- name: Build binary | ||
run: tox -e freeze | ||
|
||
- name: Pack binary (Windows) | ||
if: ${{ runner.os == 'Windows' }} | ||
run: 7z a shub-Windows.zip dist_bin/shub.exe | ||
|
||
- name: Pack binary (Linux/macOS) | ||
if: ${{ runner.os != 'Windows' }} | ||
run: tar -czvf shub-${{ runner.os }}.tar.gz dist_bin/shub | ||
|
||
- name: Upload binary | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: shub-${{ runner.os }} | ||
path: | | ||
shub-${{ runner.os }}.tar.gz | ||
shub-${{ runner.os }}.zip | ||
release: | ||
# if: startsWith(github.ref, 'refs/tags/v') # FIXME: uncomment before merging | ||
needs: freeze | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Download binaries | ||
uses: actions/download-artifact@v2 | ||
with: | ||
path: binaries | ||
|
||
- name: Display structure of downloaded files | ||
run: ls -R binaries | ||
|
||
- name: Draft release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
draft: true | ||
files: binaries/** | ||
|
||
publish: | ||
if: startsWith(github.ref, 'refs/tags/v') | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.9 | ||
|
||
- name: Publish to PyPI | ||
run: | | ||
pip install --upgrade pip | ||
pip install --upgrade setuptools wheel twine | ||
python setup.py sdist bdist_wheel | ||
export TWINE_USERNAME=__token__ | ||
export TWINE_PASSWORD=${{ secrets.PYPI_TOKEN }} | ||
twine upload dist/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
name: Tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
tests-ubuntu: | ||
name: "Test: py${{ matrix.python-version }}, Ubuntu" | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.6", "3.7", "3.8", "3.9"] | ||
|
||
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 tox | ||
run: pip install tox | ||
|
||
- name: Run tests | ||
run: tox -e py | ||
|
||
- name: Upload coverage report | ||
run: | | ||
curl -Os https://uploader.codecov.io/latest/linux/codecov | ||
chmod +x codecov | ||
./codecov | ||
tests-macos: | ||
name: "Test: py${{ matrix.python-version }}, macOS" | ||
runs-on: macos-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.6", "3.7", "3.8", "3.9"] | ||
|
||
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 tox | ||
run: pip install tox | ||
|
||
- name: Run tests | ||
run: tox -e py | ||
|
||
tests-windows: | ||
name: "Test: py${{ matrix.python-version }}, Windows" | ||
runs-on: windows-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.6", "3.7", "3.8", "3.9"] | ||
|
||
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 tox | ||
run: pip install tox | ||
|
||
- name: Run tests | ||
run: tox -e py |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.