Skip to content

Commit

Permalink
Use github-ci instead of Travis and Appveyor (#355)
Browse files Browse the repository at this point in the history
  • Loading branch information
facelessuser authored Oct 13, 2019
1 parent a9f6de6 commit ad58857
Show file tree
Hide file tree
Showing 4 changed files with 142 additions and 90 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Python package

on: [release]

jobs:

documents:
strategy:
max-parallel: 4
matrix:
python-version: [3.7]

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@master
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools
python -m pip install -r requirements/docs.txt
- name: Deploy documents
env:
GH_TOKEN: ${{ secrets.GH_DEPLOY_KEY }}
GH_USER: ${{ secrets.GH_USER }}
GH_EMAIL: ${{ secrets.GH_EMAIL }}
run: |
git config user.name ${GH_USER}
git config user.email "${GH_EMAIL}"
git remote add gh-token "https://${GH_TOKEN}@github.com/facelessuser/Rummage.git"
git fetch gh-token && git fetch gh-token gh-pages:gh-pages
python -m mkdocs gh-deploy -v --clean --remote-name gh-token
git push gh-token gh-pages
sdist:
strategy:
matrix:
python-version: [3.7]

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@master
- uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Package
run: |
pip install --upgrade setuptools
python setup.py sdist
- name: Publish
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_PWD }}
84 changes: 84 additions & 0 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
name: Python package

on: [push]

jobs:
tests:
strategy:
fail-fast: false
max-parallel: 4
matrix:
platform: [ubuntu-latest, windows-latest]
python-version: [3.5, 3.6, 3.7]

runs-on: ${{ matrix.platform }}

steps:
- uses: actions/checkout@master
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools tox coverage codecov
python -m pip install -r requirements/test.txt
python -m pip install -r requirements/test-project.txt
python -m pip install -r requirements/setup.txt
- name: Test with pytest
run: |
python -m pytest --cov rummage --cov-append tests
python -m coverage html -d coverage
python -m coverage report --show-missing
- name: Coverage Report
if: success()
run: |
python -m codecov -t ${{ secrets.CODECOV_TOKEN }}
lint:
strategy:
max-parallel: 4
matrix:
python-version: [3.7]

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@master
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools
python -m pip install -r requirements/lint.txt
- name: Lint
run: |
python -m flake8 .
documents:
strategy:
max-parallel: 4
matrix:
python-version: [3.7]

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@master
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools
python -m pip install -r requirements/docs.txt
- name: Install Aspell
run: |
sudo apt-get install aspell aspell-en
- name: Build documents
run: |
python -m mkdocs build --clean --verbose --strict
python -m pyspelling
56 changes: 0 additions & 56 deletions .travis.yml

This file was deleted.

34 changes: 0 additions & 34 deletions appveyor.yml

This file was deleted.

0 comments on commit ad58857

Please sign in to comment.