Skip to content

Commit

Permalink
Merge pull request #19 from icgood/workflows
Browse files Browse the repository at this point in the history
Switch to Github Actions build workflows
  • Loading branch information
icgood authored May 11, 2021
2 parents c98aa37 + a5c2a08 commit a6190b2
Show file tree
Hide file tree
Showing 12 changed files with 141 additions and 54 deletions.
6 changes: 6 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
exclude-labels:
- 'skip-changelog'
template: |
## Change Log
$CHANGES
61 changes: 61 additions & 0 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: build

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:

runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [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 --upgrade pip setuptools wheel coveralls
python -m pip install --upgrade -r requirements-dev.txt
- name: Lint with flake8
run: |
flake8 pymapadmin test
- name: Type checking with mypy
run: |
mypy pymapadmin test
- name: Test with pytest
run: |
py.test --cov=pymapadmin
- name: Report test coverage to Coveralls
if: success()
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
coveralls --service=github
docs:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade -r requirements-dev.txt
python -m pip install --upgrade -r doc/requirements.txt
- name: Build the Sphinx documentation
run: |
make -C doc html
52 changes: 52 additions & 0 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: publish

on:
release:
types: [ published ]

jobs:
deploy:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
docs:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade -r requirements-dev.txt
python -m pip install --upgrade -r doc/requirements.txt
- name: Build the Sphinx documentation
run: |
make -C doc html
- name: Deploy to GitHub Pages
if: success()
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ github.token }}
publish_dir: ./doc/build/html
15 changes: 15 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: draft

on:
push:
branches:
- master

jobs:
update_release_draft:

runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ github.token }}
1 change: 0 additions & 1 deletion .lvimrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
let g:ale_fix_on_save = 1
let g:ale_fixers = {
\ 'python': ['autopep8'],
\}
31 changes: 0 additions & 31 deletions .travis.yml

This file was deleted.

17 changes: 0 additions & 17 deletions .vscode/settings.json

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## The MIT License (MIT)

Copyright (c) 2019 Ian Good
Copyright (c) 2021 Ian Good

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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
pymap-admin
===========

[![Build Status](https://travis-ci.com/icgood/pymap-admin.svg?branch=master)](https://travis-ci.com/icgood/pymap-admin)
[![build](https://github.com/icgood/pymap-admin/actions/workflows/python-package.yml/badge.svg)](https://github.com/icgood/pymap-admin/actions/workflows/python-package.yml)
[![Coverage Status](https://coveralls.io/repos/icgood/pymap-admin/badge.svg)](https://coveralls.io/r/icgood/pymap-admin)
[![PyPI](https://img.shields.io/pypi/v/pymap-admin.svg)](https://pypi.python.org/pypi/pymap-admin)
[![PyPI](https://img.shields.io/pypi/pyversions/pymap-admin.svg)](https://pypi.python.org/pypi/pymap-admin)
Expand Down
1 change: 1 addition & 0 deletions requirements-all.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-e '.[optional]'
3 changes: 2 additions & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ pytest-asyncio
pytest-cov
rope

-e '.[optional,build]'
-r requirements-all.txt
-e '.[build]'
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2020 Ian C. Good
# Copyright (c) 2021 Ian C. Good
#
# 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 Expand Up @@ -29,7 +29,7 @@


setup(name='pymap-admin',
version='0.7.0',
version='0.7.1',
author='Ian Good',
author_email='[email protected]',
description='Admin tool for running pymap instances.',
Expand Down

0 comments on commit a6190b2

Please sign in to comment.