Skip to content
Open
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
26 changes: 26 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: ci

on:
push:
branches:
- master
pull_request:
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ '2.x', '3.6', '3.x' ]
fail-fast: false
name: Python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- run: pip install . # TODO: cache deps
- run: python -m unittest discover
- run: flake8 ./tests/ ./flake8_formatter_junit_xml/
11 changes: 0 additions & 11 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

requires = [
"flake8 > 3.0.0",
"junit-xml >= 1.8"
"junit-xml >= 1.8, < 1.9"
]

readme = open('README.rst').read()
Expand Down
7 changes: 6 additions & 1 deletion tests/test_formatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
import optparse
import os
import tempfile
import xml.etree.ElementTree as ET

from flake8_formatter_junit_xml import JUnitXmlFormatter
from flake8 import style_guide
from junit_xml import TestSuite, TestCase
Expand Down Expand Up @@ -63,6 +65,9 @@ def test_scenario(self):
with open(tempfilename) as f:
content = f.read()
# print(content)
self.assertEqual(xml_content, content)
self.assertEqual(
ET.tostring(ET.fromstring(xml_content)),
ET.tostring(ET.fromstring(content))
)

os.remove(tempfilename)