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

Improvements to runtests.py + use github actions as CI #140

Merged
merged 9 commits into from
Jan 28, 2024
27 changes: 27 additions & 0 deletions .github/workflows/runtests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: runtests
run-name: Run test suite for trac-github
on: [pull_request]
jobs:
runtests-py2:
runs-on: ubuntu-20.04
container:
image: python:2.7.18-buster

steps:
- uses: actions/checkout@v4
- run: pip install nox-py2
- run: git config --global user.name runtest
- run: git config --global user.email runtest@localhost
- run: nox --non-interactive --error-on-missing-interpreter --session runtests -- --git-default-branch=master

# runtests-py3:
# runs-on: ubuntu-latest
# steps:
# - uses: wntrblm/[email protected]
# with:
# python-versions: "3.7"
# - uses: actions/checkout@v4
# - run: git config --global user.name runtest
# - run: git config --global user.email runtest@localhost
# - run: git config --global init.defaultBranch main
# - run: nox --non-interactive --error-on-missing-interpreter --session runtests
12 changes: 0 additions & 12 deletions .travis.yml

This file was deleted.

16 changes: 16 additions & 0 deletions noxfile.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import sys

import nox

if sys.version_info.major == 2:
TRAC_VERSIONS = ["1.4.4", "1.2.6"]
else:
TRAC_VERSIONS = ["1.6"]


@nox.session
@nox.parametrize("trac", TRAC_VERSIONS)
def runtests(session, trac):
session.install("-r", "requirements_test.txt")
session.install("Trac==%s" % trac)
session.run("python", "runtests.py", *session.posargs)
5 changes: 5 additions & 0 deletions requirements_test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
-e .
requests-oauthlib==1.3.1
lxml==5.0.1
# Obviously Trac is also needed, but because we want to test several versions
# then we install it manually
Loading