Skip to content

Commit 6db10e4

Browse files
authored
Merge pull request #140 from bmispelon/runtests-improvements-ci
Improvements to runtests.py + use github actions as CI
2 parents 004b382 + a887dfe commit 6db10e4

File tree

5 files changed

+185
-80
lines changed

5 files changed

+185
-80
lines changed

.github/workflows/runtests.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: runtests
2+
run-name: Run test suite for trac-github
3+
on: [pull_request]
4+
jobs:
5+
runtests-py2:
6+
runs-on: ubuntu-20.04
7+
container:
8+
image: python:2.7.18-buster
9+
10+
steps:
11+
- uses: actions/checkout@v4
12+
- run: pip install nox-py2
13+
- run: git config --global user.name runtest
14+
- run: git config --global user.email runtest@localhost
15+
- run: nox --non-interactive --error-on-missing-interpreter --session runtests -- --git-default-branch=master
16+
17+
# runtests-py3:
18+
# runs-on: ubuntu-latest
19+
# steps:
20+
# - uses: wntrblm/[email protected]
21+
# with:
22+
# python-versions: "3.7"
23+
# - uses: actions/checkout@v4
24+
# - run: git config --global user.name runtest
25+
# - run: git config --global user.email runtest@localhost
26+
# - run: git config --global init.defaultBranch main
27+
# - run: nox --non-interactive --error-on-missing-interpreter --session runtests

.travis.yml

Lines changed: 0 additions & 12 deletions
This file was deleted.

noxfile.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import sys
2+
3+
import nox
4+
5+
if sys.version_info.major == 2:
6+
TRAC_VERSIONS = ["1.4.4", "1.2.6"]
7+
else:
8+
TRAC_VERSIONS = ["1.6"]
9+
10+
11+
@nox.session
12+
@nox.parametrize("trac", TRAC_VERSIONS)
13+
def runtests(session, trac):
14+
session.install("-r", "requirements_test.txt")
15+
session.install("Trac==%s" % trac)
16+
session.run("python", "runtests.py", *session.posargs)

requirements_test.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
-e .
2+
requests-oauthlib==1.3.1
3+
lxml==5.0.1
4+
# Obviously Trac is also needed, but because we want to test several versions
5+
# then we install it manually

0 commit comments

Comments
 (0)