Skip to content

Commit

Permalink
Switch to github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
amykyta3 committed Dec 10, 2020
1 parent 648bf58 commit 4a03723
Show file tree
Hide file tree
Showing 2 changed files with 183 additions and 108 deletions.
183 changes: 183 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,183 @@
on: push
# TODO: decide this
# push:
# branches: [ master ]
# pull_request:
# branches: [ master ]

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- 3.5
- 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 dependencies
run: |
python -m pip install -U pytest pytest-cov coveralls parameterized
- name: Install
run: |
python setup.py install
- name: Test
run: |
cd test
pytest --cov=systemrdl
- name: Test (without antlr accelerator)
run: |
cd test
export SYSTEMRDL_DISABLE_ACCELERATOR=1
pytest --cov=systemrdl --cov-append
- name: Coveralls
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cd test
coveralls
#-------------------------------------------------------------------------------
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8

- name: Install dependencies
run: |
python -m pip install -U pylint
python setup.py install
- name: Install
run: |
python setup.py install
- name: Run Lint
run: |
pylint --rcfile test/pylint.rc systemrdl
#-------------------------------------------------------------------------------
mypy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8

- name: Install dependencies
run: |
python -m pip install -U mypy
- name: Type Check
run: |
mypy --config-file test/mypy.ini systemrdl
#-------------------------------------------------------------------------------
# build_wheels:
# needs:
# - test
# - lint
# - mypy
#
# name: Build wheels on ${{ matrix.os }}
# runs-on: ${{ matrix.os }}
# strategy:
# matrix:
# os:
# - ubuntu-18.04
# - windows-latest
# - macos-latest
#
# steps:
# - uses: actions/checkout@v2
#
# - uses: actions/setup-python@v2
# name: Install Python
# with:
# python-version: 3.8
#
# - name: Install cibuildwheel
# run: |
# python -m pip install cibuildwheel==1.7.1
#
# - name: Build wheels
# env:
# # Only build CPython 3.x targets
# CIBW_BUILD: "cp3*"
# # Don't build osx 10.6 (no C++11 support)
# CIBW_SKIP: "*macosx_10_6*"
# # Signal setup.py to fail if binary build fails
# SYSTEMRDL_REQUIRE_BINARY_BUILD: ~
# run: |
# python -m cibuildwheel --output-dir wheelhouse
#
# - uses: actions/upload-artifact@v2
# with:
# path: ./wheelhouse/*.whl

#-------------------------------------------------------------------------------
build_sdist:
needs:
- test
- lint
- mypy
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- uses: actions/setup-python@v2
name: Install Python
with:
python-version: 3.8

- name: Build sdist
run: python setup.py sdist

- uses: actions/upload-artifact@v2
with:
path: dist/*.tar.gz

#-------------------------------------------------------------------------------
deploy:
needs:
#- build_wheels
- build_sdist

runs-on: ubuntu-latest

# TODO: conditional
# Only publish when a GitHub Release is created.
# if: github.event_name == 'release' && github.event.action == 'published'
steps:
- uses: actions/download-artifact@v2
with:
name: artifact
path: dist

- uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.pypi_password }}
# TODO: Deleteme:
repository_url: https://test.pypi.org/legacy/
108 changes: 0 additions & 108 deletions .travis.yml

This file was deleted.

0 comments on commit 4a03723

Please sign in to comment.