Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve setup.py, fix Makefile and replace Travis with GHA #247

Merged
merged 1 commit into from
Mar 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: build
on:
pull_request: ~
push:
branches:
- master

jobs:

package:

name: Build package on ${{ matrix.os }}
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-latest, macos-latest]

steps:
- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.7

- name: Build package
run: |
make build
6 changes: 5 additions & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ on:
- master

jobs:

documentation:

name: Build docs on ${{ matrix.os }}
runs-on: ${{ matrix.os }}

Expand All @@ -16,10 +18,12 @@ jobs:

steps:
- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v1
uses: actions/setup-python@v2
with:
python-version: 3.7

- name: Build docs
run: |
cd docs && make check
2 changes: 1 addition & 1 deletion .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ pull_request_rules:
conditions:
- label=ready-to-merge
- '#approved-reviews-by>=1'
- status-success~=continuous-integration/travis-ci
- status-success~=Build docs
- status-success~=Build package
- status-success~=docs/readthedocs.org
name: default
34 changes: 0 additions & 34 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
ENV_DIR := .env
ENV_BIN := $(ENV_DIR)/bin
ACTIVATE := $(ENV_BIN)/activate
PYTHON := python3.7
PIP := $(ENV_BIN)/pip3.7
PYTHON := python3
PIP := $(ENV_BIN)/pip3
TWINE := $(ENV_BIN)/twine
DIST_DIR := .dist
PYPIRC := ~/.pypirc
Expand Down
5 changes: 4 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,14 @@
filepath = os.path.join(pwd, "src", "crate", "theme", "rtd", "__init__.py")
version = machinery.SourceFileLoader("theme", filepath).load_module().__version__

README = open(os.path.join(pwd, 'README.rst')).read()

setup(
name="crate-docs-theme",
version=version,
description="Crate Docs Theme",
long_description="A Sphinx theme for the Crate Documentation",
long_description=README,
long_description_content_type="text/x-rst",
classifiers=[
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
Expand Down