Merge branch 'release/1.0.0' #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: django-admin-access-log CI | |
on: | |
push: | |
branches: [main, develop] | |
tags: | |
- "*" | |
pull_request: | |
branches: [ main ] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
max-parallel: 4 | |
matrix: | |
python-version: [ 3.6, 3.7, 3.8, 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 | |
pip install -r requirements.txt | |
- name: Install tox | |
run: python -m pip install --upgrade codecov tox tox-py | |
- name: Test with tox ${{ matrix.python-version }} | |
run: tox --py current | |
- name: "Python3: Run tests and report to Coveralls" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
python -m pip install . | |
python -m pip install -r requirements_test.txt | |
python -m pip install coveralls==3.1.0 coverage | |
python -m coverage run --source django-admin-access-log runtests.py | |
coveralls --service=github | |
# read-the-docs: | |
# if: startsWith(github.ref, 'refs/tags') || github.ref == 'refs/heads/main' | |
# runs-on: ubuntu-latest | |
# needs: [test] | |
# steps: | |
# - name: Trigger RTDs build | |
# uses: dfm/rtds-action@v1 | |
# with: | |
# webhook_url: ${{ secrets.RTDS_WEBHOOK_URL }} | |
# webhook_token: ${{ secrets.RTDS_WEBHOOK_TOKEN }} | |
# commit_ref: ${{ github.ref }} | |
build-n-publish: | |
if: startsWith(github.ref, 'refs/tags') | |
name: "Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI" | |
runs-on: ubuntu-latest | |
needs: [test] | |
steps: | |
- uses: actions/checkout@master | |
- name: "Set up Python 3.8" | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.8 | |
- name: "Install pypa/build" | |
run: | | |
python -m pip install build --user | |
- name: "Build a binary wheel and a source tarball" | |
run: | | |
python -m build --sdist --wheel --outdir dist/ . | |
- name: "Publish distribution 📦 to Test PyPI" | |
uses: pypa/gh-action-pypi-publish@master | |
with: | |
password: ${{ secrets.PYPI_API_TOKEN }} |