Skip to content

Commit

Permalink
Switch to common workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
virtuald committed Jan 17, 2022
1 parent 961b125 commit e41ba80
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 84 deletions.
77 changes: 10 additions & 67 deletions .github/workflows/dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,70 +10,13 @@ on:
- '*'

jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: psf/black@stable

#
# Test wheels
#

# test:
# runs-on: ${{ matrix.os }}
# strategy:
# matrix:
# os: [windows-latest, macos-latest, ubuntu-18.04]
# python_version: [3.6, 3.7, 3.8, 3.9]
# architecture: [x86, x64]
# exclude:
# - os: macos-latest
# architecture: x86
# - os: ubuntu-18.04
# architecture: x86

# steps:
# - uses: actions/checkout@v2
# - uses: actions/setup-python@v2
# with:
# python-version: ${{ matrix.python_version }}
# architecture: ${{ matrix.architecture }}

# - uses: robotpy/build-actions/build-wheel@v2021
# # - uses: robotpy/build-actions/test-native-wheel@v2021

# - uses: robotpy/build-actions/validate-sphinx@v2021
# if: ${{ matrix.python_version == '3.7' && matrix.os == 'ubuntu-18.04' }}


publish-pypi:
runs-on: ubuntu-latest
needs: [check]
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')

steps:
- uses: actions/checkout@v2

- uses: actions/setup-python@v2
with:
python-version: 3.8
- run: pip install wheel

- name: Build packages
run: python setup.py sdist bdist_wheel
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.pypi_password }}

ping:
runs-on: ubuntu-latest
needs: [publish-pypi]
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')

steps:
- uses: robotpy/build-actions/ping-meta@v2021
with:
token: ${{ secrets.REPO_ACCESS_TOKEN }}
ci:
uses: robotpy/build-actions/.github/workflows/package-pure.yml@v2022
with:
enable_sphinx_check: false
secrets:
SSH_USER: ${{ secrets.SSH_USER }}
SSH_KEY: ${{ secrets.SSH_KEY }}
SSH_PASSPHRASE: ${{ secrets.SSH_PASSPHRASE }}
META_REPO_ACCESS_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }}
PYPI_API_TOKEN: ${{ secrets.PYPI_PASSWORD }}
1 change: 1 addition & 0 deletions tests/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pytest
13 changes: 13 additions & 0 deletions tests/run_tests.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env python3

import os
from os.path import abspath, dirname
import sys
import subprocess

if __name__ == "__main__":

root = abspath(dirname(__file__))
os.chdir(root)

subprocess.check_call([sys.executable, "-m", "pytest", "-vv"])
17 changes: 0 additions & 17 deletions tests/run_tests.sh

This file was deleted.

0 comments on commit e41ba80

Please sign in to comment.