summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@jelmer.uk>2022-01-28 22:21:51 +0000
committerGitHub <noreply@github.com>2022-01-28 22:21:51 +0000
commita01ce5350a106dbce313b1a6370593227574379d (patch)
tree8ab0fd88eeb9f49b13ef9f580c02b3612e6e55c0
parentae22ad000ddcc9b2fc0a3f1cb4e5703d308d7c4d (diff)
parent7d70a59b4b4d6305e6a0bf52be1d7e4e33b933a7 (diff)
downloadfixtures-git-a01ce5350a106dbce313b1a6370593227574379d.tar.gz
Merge pull request #51 from stephenfin/github-actions
Migrate from Travis to GitHub Actions
-rw-r--r--.github/workflows/ci.yaml68
-rw-r--r--.travis.yml21
-rw-r--r--README.rst (renamed from README)0
-rw-r--r--fixtures/tests/__init__.py2
-rw-r--r--pyproject.toml3
-rw-r--r--setup.cfg13
-rwxr-xr-xsetup.py5
7 files changed, 82 insertions, 30 deletions
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
new file mode 100644
index 0000000..066235e
--- /dev/null
+++ b/.github/workflows/ci.yaml
@@ -0,0 +1,68 @@
+---
+name: CI
+on:
+ - push
+ - pull_request
+jobs:
+ test:
+ name: Run unit tests
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ python: [3.6, 3.7, 3.8, 3.9]
+ steps:
+ - name: Checkout source code
+ uses: actions/checkout@v2
+ - name: Set up Python ${{ matrix.python }}
+ uses: actions/setup-python@v2
+ with:
+ python-version: ${{ matrix.python }}
+ - name: Install dependencies
+ run: python -m pip install .[docs,test]
+ - name: Run unit tests
+ run: make check
+ docs:
+ name: Build docs
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout source code
+ uses: actions/checkout@v2
+ with:
+ fetch-depth: 0
+ - name: Set up Python 3.9
+ uses: actions/setup-python@v2
+ with:
+ python-version: 3.9
+ - name: Install dependencies
+ run: python -m pip install docutils
+ - name: Build docs
+ run: rst2html.py README.rst README.html
+ - name: Archive build results
+ uses: actions/upload-artifact@v2
+ with:
+ name: html-docs-build
+ path: README.html
+ retention-days: 7
+ release:
+ name: Upload release artifacts
+ runs-on: ubuntu-latest
+ needs: test
+ if: github.event_name == 'push'
+ steps:
+ - name: Checkout source code
+ uses: actions/checkout@v2
+ with:
+ fetch-depth: 0
+ - name: Set up Python 3.9
+ uses: actions/setup-python@v2
+ with:
+ python-version: 3.9
+ - name: Install dependencies
+ run: python -m pip install build
+ - name: Build a binary wheel and a source tarball
+ run: python -m build --sdist --wheel --outdir dist/ .
+ - name: Publish distribution to PyPI
+ if: startsWith(github.ref, 'refs/tags')
+ uses: pypa/gh-action-pypi-publish@master
+ with:
+ password: ${{ secrets.PYPI_API_TOKEN }}
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index bdbdd70..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,21 +0,0 @@
----
-language: python
-
-python:
- - "3.6"
- - "3.7"
- - "3.8"
- - "3.9"
- - "pypy3"
- - "nightly"
-
-install:
- - pip install -U pip
- - pip install -U wheel setuptools pbr
- - pip install -U .[docs,test]
- - pip list
- - python --version
-
-script:
- - make check
- - rst2html.py README README.html
diff --git a/README b/README.rst
index b60d993..b60d993 100644
--- a/README
+++ b/README.rst
diff --git a/fixtures/tests/__init__.py b/fixtures/tests/__init__.py
index 1458043..827091e 100644
--- a/fixtures/tests/__init__.py
+++ b/fixtures/tests/__init__.py
@@ -35,5 +35,5 @@ def load_tests(loader, standard_tests, pattern):
standard_tests.addTests(
loader.loadTestsFromName('fixtures.tests._fixtures'))
doctest.set_unittest_reportflags(doctest.REPORT_ONLY_FIRST_FAILURE)
- standard_tests.addTest(doctest.DocFileSuite("../../README"))
+ standard_tests.addTest(doctest.DocFileSuite("../../README.rst"))
return standard_tests
diff --git a/pyproject.toml b/pyproject.toml
new file mode 100644
index 0000000..0d225e9
--- /dev/null
+++ b/pyproject.toml
@@ -0,0 +1,3 @@
+[build-system]
+requires = ["pbr>=5.7.0", "setuptools>=36.6.0", "wheel"]
+build-backend = "pbr.build"
diff --git a/setup.cfg b/setup.cfg
index f04b884..67d60e8 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,13 +1,14 @@
[metadata]
name = fixtures
summary = Fixtures, reusable state for writing clean tests and more.
-description-file =
- README
+description_file =
+ README.rst
+description_content_type = text/x-rst; charset=UTF-8
author = Robert Collins
-author-email = robertc@robertcollins.net
-home-page = https://github.com/testing-cabal/fixtures
-python-requires = >=3.6
-classifier =
+author_email = robertc@robertcollins.net
+url = https://github.com/testing-cabal/fixtures
+python_requires = >=3.6
+classifiers =
Development Status :: 6 - Mature
Intended Audience :: Developers
License :: OSI Approved :: BSD License
diff --git a/setup.py b/setup.py
index 6ce9781..e6eaf68 100755
--- a/setup.py
+++ b/setup.py
@@ -3,5 +3,6 @@
import setuptools
setuptools.setup(
- setup_requires=['pbr>0.11'],
- pbr=True)
+ setup_requires=['pbr>2.0'],
+ pbr=True,
+)