Replace travis CI with GitHub Actions
This commit is contained in:
parent
945b636a86
commit
97e3b34fb1
3 changed files with 126 additions and 95 deletions
80
.github/workflows/github-actions.yml
vendored
Normal file
80
.github/workflows/github-actions.yml
vendored
Normal file
|
@ -0,0 +1,80 @@
|
||||||
|
name: django-cas-server
|
||||||
|
run-name: ${{ github.actor }} is running django-cas-server CI tests
|
||||||
|
on: [push]
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
jobs:
|
||||||
|
flake8:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: python:bookworm
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- run: pip install tox
|
||||||
|
- run: tox -e flake8
|
||||||
|
check_rst:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: python:bookworm
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- run: pip install tox
|
||||||
|
- run: tox -e check_rst
|
||||||
|
coverage:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: python:bookworm
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- run: pip install tox
|
||||||
|
- run: tox -e coverage
|
||||||
|
env:
|
||||||
|
COVERAGE_TOKEN: ${{ secrets.COVERAGE_TOKEN }}
|
||||||
|
tests:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
arch: ["amd64", "ppc64le"]
|
||||||
|
tox:
|
||||||
|
# REHL 7 support and Ubuntu bionic
|
||||||
|
- python: "3.6"
|
||||||
|
env: "py36-django111"
|
||||||
|
# RHEL 8 support
|
||||||
|
- python: "3.6"
|
||||||
|
env: "py36-django22"
|
||||||
|
# Debian buster support
|
||||||
|
- python: "3.7"
|
||||||
|
env: "py37-django111"
|
||||||
|
# Ubuntu focal support
|
||||||
|
- python: "3.8"
|
||||||
|
env: "py38-django22"
|
||||||
|
# Debian bullseye
|
||||||
|
- python: "3.9"
|
||||||
|
env: py39-django22
|
||||||
|
# Ubuntu jammy
|
||||||
|
- python: "3.10"
|
||||||
|
env: "py310-django32"
|
||||||
|
# Debian bookworm
|
||||||
|
- python: "3.11"
|
||||||
|
env: py311-django32
|
||||||
|
# Django additional supported version
|
||||||
|
- python: "3.9"
|
||||||
|
env: py39-django42
|
||||||
|
- python: "3.10"
|
||||||
|
env: py310-django42
|
||||||
|
- python: "3.11"
|
||||||
|
env: py311-django42
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- if: matrix.arch != 'amd64'
|
||||||
|
name: "Install docker multiarch support"
|
||||||
|
run: |
|
||||||
|
sudo apt-get update -y
|
||||||
|
sudo apt-get install -y qemu qemu-user-static
|
||||||
|
sudo docker run --rm --privileged multiarch/qemu-user-static --reset -p yes --credential yes
|
||||||
|
- name: "Check docker arch ${{ matrix.arch }} support"
|
||||||
|
run: sudo docker run --platform linux/${{ matrix.arch }} --rm ${{ matrix.arch }}/python:${{ matrix.tox.python }} /bin/bash -c "echo -n \"Running with arch \"; uname -m;"
|
||||||
|
- name: "Run tests on arch ${{ matrix.arch }}"
|
||||||
|
run: sudo docker run --platform linux/${{ matrix.arch }} --rm -v $(pwd):$(pwd) ${{ matrix.arch }}/python:${{ matrix.tox.python }} /bin/bash -c "cd $(pwd); uname -m; pip install tox; tox -e ${{ matrix.tox.env }}"
|
67
.travis.yml
67
.travis.yml
|
@ -1,67 +0,0 @@
|
||||||
dist: focal
|
|
||||||
language: python
|
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
# generic checks
|
|
||||||
- python: "3.9"
|
|
||||||
env: TOX_ENV=flake8
|
|
||||||
- python: "3.9"
|
|
||||||
env: TOX_ENV=check_rst
|
|
||||||
- python: "3.9"
|
|
||||||
env: TOX_ENV=coverage
|
|
||||||
# REHL 7 support and Ubuntu bionic
|
|
||||||
- python: "3.6"
|
|
||||||
env: TOX_ENV=py36-django111
|
|
||||||
- python: "3.6"
|
|
||||||
env: TOX_ENV=py36-django111
|
|
||||||
arch: ppc64le
|
|
||||||
# RHEL 8 support
|
|
||||||
- python: "3.6"
|
|
||||||
env: TOX_ENV=py36-django22
|
|
||||||
- python: "3.6"
|
|
||||||
env: TOX_ENV=py36-django22
|
|
||||||
arch: ppc64le
|
|
||||||
# Debian buster support
|
|
||||||
- python: "3.7"
|
|
||||||
env: TOX_ENV=py37-django111
|
|
||||||
- python: "3.7"
|
|
||||||
env: TOX_ENV=py37-django111
|
|
||||||
arch: ppc64le
|
|
||||||
# Ubuntu focal and Ubuntu groovy support
|
|
||||||
- python: "3.8"
|
|
||||||
env: TOX_ENV=py38-django22
|
|
||||||
- python: "3.8"
|
|
||||||
env: TOX_ENV=py38-django22
|
|
||||||
arch: ppc64le
|
|
||||||
# Debian bullseye and Ubuntu hirsute and impish support
|
|
||||||
- python: "3.9"
|
|
||||||
env: TOX_ENV=py39-django22
|
|
||||||
- python: "3.9"
|
|
||||||
env: TOX_ENV=py39-django22
|
|
||||||
arch: ppc64le
|
|
||||||
# Ubuntu jammy and kinetic support
|
|
||||||
- python: "3.10"
|
|
||||||
env: TOX_ENV=py310-django32
|
|
||||||
- python: "3.10"
|
|
||||||
env: TOX_ENV=py310-django32
|
|
||||||
arch: ppc64le
|
|
||||||
# Django additional supported version
|
|
||||||
- python: "3.9"
|
|
||||||
env: TOX_ENV=py39-django32
|
|
||||||
- python: "3.10"
|
|
||||||
env: TOX_ENV=py310-django40
|
|
||||||
- python: "3.10"
|
|
||||||
env: TOX_ENV=py310-django41
|
|
||||||
|
|
||||||
cache:
|
|
||||||
directories:
|
|
||||||
- $HOME/.cache/pip/http/
|
|
||||||
- $HOME/build/nitmir/django-cas-server/.tox/$TOX_ENV/
|
|
||||||
install:
|
|
||||||
- travis_retry pip install setuptools --upgrade
|
|
||||||
- pip install tox $PKGS
|
|
||||||
- pip freeze
|
|
||||||
script:
|
|
||||||
- tox -e $TOX_ENV
|
|
||||||
after_script:
|
|
||||||
- cat tox_log/*.log
|
|
74
tox.ini
74
tox.ini
|
@ -8,6 +8,7 @@ envlist=
|
||||||
py3-django32,
|
py3-django32,
|
||||||
py3-django40,
|
py3-django40,
|
||||||
py3-django41,
|
py3-django41,
|
||||||
|
py3-django42,
|
||||||
|
|
||||||
##################
|
##################
|
||||||
# generic config #
|
# generic config #
|
||||||
|
@ -16,6 +17,7 @@ envlist=
|
||||||
[flake8]
|
[flake8]
|
||||||
max-line-length=100
|
max-line-length=100
|
||||||
exclude=migrations
|
exclude=migrations
|
||||||
|
allowlist_externals={[post_cmd]allowlist_external}
|
||||||
|
|
||||||
[base]
|
[base]
|
||||||
deps =
|
deps =
|
||||||
|
@ -26,16 +28,18 @@ commands=
|
||||||
find {toxworkdir} -name '*.pyc' -delete
|
find {toxworkdir} -name '*.pyc' -delete
|
||||||
mkdir -p {toxinidir}/tox_logs/
|
mkdir -p {toxinidir}/tox_logs/
|
||||||
bash -c "mv {toxworkdir}/{envname}/log/* {toxinidir}/tox_logs/"
|
bash -c "mv {toxworkdir}/{envname}/log/* {toxinidir}/tox_logs/"
|
||||||
whitelist_externals=
|
allowlist_externals=
|
||||||
find
|
find
|
||||||
bash
|
bash
|
||||||
mkdir
|
mkdir
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
|
setenv=
|
||||||
|
PYTHONWARNINGS=always
|
||||||
commands=
|
commands=
|
||||||
py.test -rw {posargs:cas_server/tests/}
|
py.test -rw {posargs:cas_server/tests/}
|
||||||
{[post_cmd]commands}
|
{[post_cmd]commands}
|
||||||
whitelist_externals={[post_cmd]whitelist_externals}
|
allowlist_externals={[post_cmd]allowlist_externals}
|
||||||
|
|
||||||
###################
|
###################
|
||||||
# genercic checks #
|
# genercic checks #
|
||||||
|
@ -48,7 +52,7 @@ skip_install=True
|
||||||
commands=
|
commands=
|
||||||
flake8 {toxinidir}/cas_server
|
flake8 {toxinidir}/cas_server
|
||||||
{[post_cmd]commands}
|
{[post_cmd]commands}
|
||||||
whitelist_externals={[post_cmd]whitelist_externals}
|
allowlist_externals={[post_cmd]allowlist_externals}
|
||||||
|
|
||||||
[testenv:check_rst]
|
[testenv:check_rst]
|
||||||
basepython=python3
|
basepython=python3
|
||||||
|
@ -60,7 +64,7 @@ commands=
|
||||||
rst2html.py --strict {toxinidir}/README.rst /dev/null
|
rst2html.py --strict {toxinidir}/README.rst /dev/null
|
||||||
rst2html.py --halt=warning {toxinidir}/CHANGELOG.rst /dev/null
|
rst2html.py --halt=warning {toxinidir}/CHANGELOG.rst /dev/null
|
||||||
{[post_cmd]commands}
|
{[post_cmd]commands}
|
||||||
whitelist_externals={[post_cmd]whitelist_externals}
|
allowlist_externals={[post_cmd]allowlist_externals}
|
||||||
|
|
||||||
[testenv:coverage]
|
[testenv:coverage]
|
||||||
basepython=python3
|
basepython=python3
|
||||||
|
@ -75,9 +79,13 @@ deps=
|
||||||
skip_install=True
|
skip_install=True
|
||||||
commands=
|
commands=
|
||||||
py.test --cov=cas_server --cov-report term --cov-report html
|
py.test --cov=cas_server --cov-report term --cov-report html
|
||||||
|
git config --global --add safe.directory "{toxinidir}"
|
||||||
{toxinidir}/.update_coverage "{toxinidir}" "django-cas-server"
|
{toxinidir}/.update_coverage "{toxinidir}" "django-cas-server"
|
||||||
{[post_cmd]commands}
|
{[post_cmd]commands}
|
||||||
whitelist_externals={[post_cmd]whitelist_externals}
|
allowlist_externals=
|
||||||
|
{toxinidir}/.update_coverage
|
||||||
|
git
|
||||||
|
{[post_cmd]allowlist_externals}
|
||||||
|
|
||||||
|
|
||||||
####################
|
####################
|
||||||
|
@ -130,6 +138,12 @@ deps =
|
||||||
Django>=4.1,<4.2
|
Django>=4.1,<4.2
|
||||||
{[base]deps}
|
{[base]deps}
|
||||||
|
|
||||||
|
[testenv:py3-django42]
|
||||||
|
basepython=python3
|
||||||
|
deps =
|
||||||
|
Django>=4.2,<4.3
|
||||||
|
{[base]deps}
|
||||||
|
|
||||||
#########################
|
#########################
|
||||||
# Debian strech support #
|
# Debian strech support #
|
||||||
#########################
|
#########################
|
||||||
|
@ -170,9 +184,9 @@ deps =
|
||||||
Django>=1.11,<1.12
|
Django>=1.11,<1.12
|
||||||
{[base]deps}
|
{[base]deps}
|
||||||
|
|
||||||
##########################################
|
########################
|
||||||
# Ubuntu focal and Ubuntu groovy support #
|
# Ubuntu focal support #
|
||||||
##########################################
|
########################
|
||||||
|
|
||||||
[testenv:py38-django22]
|
[testenv:py38-django22]
|
||||||
basepython=python3.8
|
basepython=python3.8
|
||||||
|
@ -180,9 +194,9 @@ deps =
|
||||||
Django>=2.2,<3.0
|
Django>=2.2,<3.0
|
||||||
{[base]deps}
|
{[base]deps}
|
||||||
|
|
||||||
#########################################################
|
###################
|
||||||
# Debian bullseye and Ubuntu hirsute and impish support #
|
# Debian bullseye #
|
||||||
#########################################################
|
###################
|
||||||
|
|
||||||
[testenv:py39-django22]
|
[testenv:py39-django22]
|
||||||
basepython=python3.9
|
basepython=python3.9
|
||||||
|
@ -190,9 +204,9 @@ deps =
|
||||||
Django>=2.2,<3.0
|
Django>=2.2,<3.0
|
||||||
{[base]deps}
|
{[base]deps}
|
||||||
|
|
||||||
####################################
|
################
|
||||||
# Ubuntu jammy and kinetic support #
|
# Ubuntu jammy #
|
||||||
####################################
|
################
|
||||||
|
|
||||||
[testenv:py310-django32]
|
[testenv:py310-django32]
|
||||||
basepython=python3.10
|
basepython=python3.10
|
||||||
|
@ -201,31 +215,35 @@ deps =
|
||||||
{[base]deps}
|
{[base]deps}
|
||||||
|
|
||||||
|
|
||||||
|
###########################
|
||||||
|
# Debian bookworm support #
|
||||||
|
###########################
|
||||||
|
|
||||||
|
[testenv:py311-django32]
|
||||||
|
basepython=python3.11
|
||||||
|
deps =
|
||||||
|
Django>=3.2,<3.3
|
||||||
|
{[base]deps}
|
||||||
|
|
||||||
|
|
||||||
#######################################
|
#######################################
|
||||||
# Django additional supported version #
|
# Django additional supported version #
|
||||||
#######################################
|
#######################################
|
||||||
|
|
||||||
[testenv:py39-django31]
|
[testenv:py39-django42]
|
||||||
basepython=python3.9
|
basepython=python3.9
|
||||||
deps =
|
deps =
|
||||||
Django>=3.1,<3.2
|
Django>=4.2,<4.3
|
||||||
{[base]deps}
|
{[base]deps}
|
||||||
|
|
||||||
|
[testenv:py310-django42]
|
||||||
[testenv:py39-django32]
|
|
||||||
basepython=python3.9
|
|
||||||
deps =
|
|
||||||
Django>=3.2,<3.3
|
|
||||||
{[base]deps}
|
|
||||||
|
|
||||||
[testenv:py310-django40]
|
|
||||||
basepython=python3.10
|
basepython=python3.10
|
||||||
deps =
|
deps =
|
||||||
Django>=4.0,<4.1
|
Django>=4.2,<4.3
|
||||||
{[base]deps}
|
{[base]deps}
|
||||||
|
|
||||||
[testenv:py310-django41]
|
[testenv:py311-django42]
|
||||||
basepython=python3.10
|
basepython=python3.11
|
||||||
deps =
|
deps =
|
||||||
Django>=4.1,<4.2
|
Django>=4.2,<4.3
|
||||||
{[base]deps}
|
{[base]deps}
|
||||||
|
|
Loading…
Add table
Reference in a new issue