Skip to content

Commit

Permalink
[ops] switching from travis to github actions (#7)
Browse files Browse the repository at this point in the history
* [ops] switching from travis to github actions

* fixing double run of github actions
  • Loading branch information
jpetrucciani authored Oct 29, 2020
1 parent d17b258 commit abcfefa
Show file tree
Hide file tree
Showing 11 changed files with 73 additions and 331 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
name: Upload Python Package

on:
release:
types: [created]

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: set up python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
sed -i -E "s#VERSION#${GITHUB_REF/refs\/tags\//}#g" ./setup.py
- name: build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USER }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
29 changes: 24 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,46 @@
---
name: test

on: [push, pull_request]
on: [push]

jobs:
archives:
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: jpetrucciani/archives-check@master
with:
path: 'gamble/'
prospector:
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: jpetrucciani/prospector-check@master
mypy:
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: jpetrucciani/mypy-check@master
black:
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: jpetrucciani/black-check@master
tests:
runs-on: ubuntu-latest
needs: [archives, mypy, prospector, black]
strategy:
matrix:
python-version: ['3.6', '3.7', '3.8', '3.9']
name: python ${{ matrix.python-version }} tests
steps:
- uses: actions/checkout@v2
- name: setup python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: install requirements
run: pip install tox pytest pytest-cov
- name: run Tox
run: tox -e py
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -110,4 +110,8 @@ ENV/
# mkdocs documentation
/site

# End of https://www.gitignore.io/api/python
# End of https://www.gitignore.io/api/python

# vscode
.history/
.vscode/
3 changes: 3 additions & 0 deletions .prospector.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ pep8:
vulture:
run: false

bandit:
run: true

pyroma:
run: false
disable:
Expand Down
26 changes: 0 additions & 26 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2019 Jacobi Petrucciani
Copyright (c) 2020 Jacobi Petrucciani

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
12 changes: 0 additions & 12 deletions Pipfile

This file was deleted.

Loading

0 comments on commit abcfefa

Please sign in to comment.