Skip to content

Commit

Permalink
Merge pull request #140 from bmispelon/runtests-improvements-ci
Browse files Browse the repository at this point in the history
Improvements to runtests.py + use github actions as CI
  • Loading branch information
neverpanic authored Jan 28, 2024
2 parents 004b382 + a887dfe commit 6db10e4
Show file tree
Hide file tree
Showing 5 changed files with 185 additions and 80 deletions.
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

0 comments on commit 6db10e4

Please sign in to comment.