Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,16 @@ jobs:
run: make install

- name: Run tests
run: make test
run: make test

- name: Preprocess tests
run: make preprocess-test-results

- name: Test Report
uses: dorny/test-reporter@v2
if: always()
with:
name: Tests
path: '**/*-report.xml'
reporter: java-junit

3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -177,4 +177,5 @@ palindrome/output.xml
palindrome/report.html

# misc
.installed
.installed
*-report.xml
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: all palindrome
.PHONY: all palindrome install test preprocess-test-results

all: palindrome

Expand All @@ -9,4 +9,7 @@ install:
$(MAKE) -C palindrome install

test:
$(MAKE) -C palindrome test
$(MAKE) -C palindrome test

preprocess-test-results:
$(MAKE) -C palindrome preprocess-test-results
14 changes: 9 additions & 5 deletions palindrome/Makefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
.PHONY: all install test
.PHONY: build install test preprocess-test-results

all: install test
build: install test

.installed:
python -m pip install --upgrade pip && \
pip install poetry && \
poetry install && \
python -m pip install --upgrade pip
pip install poetry
poetry install
touch .installed

install: .installed

test:
poetry run invoke test-all

preprocess-test-results:
sed '0,/testsuite/s//testsuites/' robot-report.xml | tac | sed '0,/testsuite/s//testsuites/' | tac > output.xml
mv output.xml robot-report.xml
4 changes: 2 additions & 2 deletions palindrome/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@

@task
def test_robot(c):
c.run("robot tests/robot/")
c.run("robot --xunit robot-report.xml tests/robot/")

@task
def test_pytest(c):
c.run("pytest")
c.run("pytest --junitxml=pytest-report.xml")

@task(pre=[test_pytest, test_robot])
def test_all(c):
Expand Down