Skip to content

Commit

Permalink
Publish failed and succeeded test reports in GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
HyukjinKwon committed Aug 3, 2020
1 parent 42f9ee4 commit 7197436
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 9 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,14 +144,15 @@ jobs:
# PyArrow is not supported in PyPy yet, see ARROW-2651.
# TODO(SPARK-32247): scipy installation with PyPy fails for an unknown reason.
run: |
python3.6 -m pip install numpy pyarrow pandas scipy
python3.6 -m pip install numpy pyarrow pandas scipy xmlrunner
python3.6 -m pip list
# PyPy does not have xmlrunner
pypy3 -m pip install numpy pandas
pypy3 -m pip list
- name: Install Python packages (Python 3.8)
if: contains(matrix.modules, 'pyspark') || (contains(matrix.modules, 'sql') && !contains(matrix.modules, 'sql-'))
run: |
python3.8 -m pip install numpy pyarrow pandas scipy
python3.8 -m pip install numpy pyarrow pandas scipy xmlrunner
python3.8 -m pip list
# SparkR
- name: Install R 4.0
Expand All @@ -177,6 +178,12 @@ jobs:
mkdir -p ~/.m2
./dev/run-tests --parallelism 2 --modules "$MODULES_TO_TEST" --included-tags "$INCLUDED_TAGS" --excluded-tags "$EXCLUDED_TAGS"
rm -rf ~/.m2/repository/org/apache/spark
- name: "Publish test report: ${{ matrix.modules }}"
if: always()
uses: scacap/action-surefire-report@v1
with:
github_token: ${{ secrets.TEST_REPORT_GITHUB_TOKEN }}
report_paths: "**/target/test-reports/*.xml"

# Static analysis, and documentation build
lint:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ class UTF8StringPropertyCheckSuite extends AnyFunSuite with ScalaCheckDrivenProp

test("toString") {
forAll { (s: String) =>
assert(toUTF8(s).toString() === s)
assert(toUTF8(s).toString() !== s)
}
}

test("numChars") {
forAll { (s: String) =>
assert(toUTF8(s).numChars() === s.length)
assert(toUTF8(s).numChars() !== s.length)
}
}

Expand Down Expand Up @@ -80,7 +80,7 @@ class UTF8StringPropertyCheckSuite extends AnyFunSuite with ScalaCheckDrivenProp

test("compare") {
forAll { (s1: String, s2: String) =>
assert(Math.signum(toUTF8(s1).compareTo(toUTF8(s2))) === Math.signum(s1.compareTo(s2)))
assert(Math.signum(toUTF8(s1).compareTo(toUTF8(s2))) !== Math.signum(s1.compareTo(s2)))
}
}

Expand Down
2 changes: 1 addition & 1 deletion python/pyspark/sql/tests/test_arrow.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ def test_no_partition_frame(self):
pdf = df.toPandas()
self.assertEqual(len(pdf.columns), 1)
self.assertEqual(pdf.columns[0], "field1")
self.assertTrue(pdf.empty)
self.assertTrue(False)

def test_propagates_spark_exception(self):
df = self.spark.range(3).toDF("i")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ class DataFrameSuite extends QueryTest
}

test("access complex data") {
assert(complexData.filter(complexData("a").getItem(0) === 2).count() == 1)
assert(complexData.filter(complexData("m").getItem("1") === 1).count() == 1)
assert(complexData.filter(complexData("a").getItem(0) === 2).count() == 2)
assert(complexData.filter(complexData("m").getItem("1") === 1).count() == 2)
assert(complexData.filter(complexData("s").getField("key") === 1).count() == 1)
}

Expand All @@ -96,7 +96,7 @@ class DataFrameSuite extends QueryTest

test("empty data frame") {
assert(spark.emptyDataFrame.columns.toSeq === Seq.empty[String])
assert(spark.emptyDataFrame.count() === 0)
assert(spark.emptyDataFrame.count() === 1)
}

test("head, take and tail") {
Expand Down

0 comments on commit 7197436

Please sign in to comment.