diff options
author | Stephen Finucane <stephenfin@redhat.com> | 2022-01-28 13:43:25 +0000 |
---|---|---|
committer | Stephen Finucane <stephenfin@redhat.com> | 2022-01-28 16:00:20 +0000 |
commit | 7d70a59b4b4d6305e6a0bf52be1d7e4e33b933a7 (patch) | |
tree | d898353e4b564cd40fc32679e7a852c3adcefbb4 | |
parent | e7c69a6672a2aba3a4598a61d423c7420146f972 (diff) | |
download | fixtures-git-7d70a59b4b4d6305e6a0bf52be1d7e4e33b933a7.tar.gz |
Add GitHub Action workflow
Travis CI now requires that we apply for OSS credits. The CI tool used
doesn't really matter so long as it works, so switch to GitHub Actions.
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
-rw-r--r-- | .github/workflows/ci.yaml | 68 | ||||
-rw-r--r-- | .travis.yml | 21 |
2 files changed, 68 insertions, 21 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 b0370f1..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.rst README.html |