Skip to content

Commit df3a36d

Browse files
authored
[CI] Ensure each yml change triggers the action (#1413)
* Make sure each action gets triggered when the yml file gets modified * Add R too * Fix failed R tests
1 parent e82a76f commit df3a36d

File tree

6 files changed

+13
-8
lines changed

6 files changed

+13
-8
lines changed

.github/workflows/example.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@ on:
55
- master
66
paths:
77
- 'examples/**'
8+
- '.github/workflows/example.yml'
89
pull_request:
910
branches:
1011
- '*'
1112
paths:
1213
- 'examples/**'
14+
- '.github/workflows/example.yml'
1315

1416
permissions:
1517
contents: read

.github/workflows/java.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ on:
1212
- 'flink-shaded/**'
1313
- 'snowflake/**'
1414
- 'pom.xml'
15+
- '.github/workflows/java.yml'
1516
pull_request:
1617
branches:
1718
- '*'
@@ -23,6 +24,7 @@ on:
2324
- 'flink-shaded/**'
2425
- 'snowflake/**'
2526
- 'pom.xml'
27+
- '.github/workflows/java.yml'
2628

2729
env:
2830
MAVEN_OPTS: -Dmaven.wagon.httpconnectionManager.ttlSeconds=60

.github/workflows/python-wheel.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ on:
1010
- 'spark-shaded/**'
1111
- 'pom.xml'
1212
- 'python/**'
13+
- '.github/workflows/python-wheel.yml'
1314
pull_request:
1415
branches:
1516
- '*'

.github/workflows/python.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ on:
1010
- 'spark-shaded/**'
1111
- 'pom.xml'
1212
- 'python/**'
13+
- '.github/workflows/python.yml'
1314
pull_request:
1415
branches:
1516
- '*'
@@ -19,6 +20,7 @@ on:
1920
- 'spark-shaded/**'
2021
- 'pom.xml'
2122
- 'python/**'
23+
- '.github/workflows/python.yml'
2224

2325
env:
2426
MAVEN_OPTS: -Dmaven.wagon.httpconnectionManager.ttlSeconds=60

.github/workflows/r.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ on:
1010
- 'spark-shaded/**'
1111
- 'pom.xml'
1212
- 'R/**'
13+
- '.github/workflows/r.yml'
1314
pull_request:
1415
branches:
1516
- '*'
@@ -19,6 +20,7 @@ on:
1920
- 'spark-shaded/**'
2021
- 'pom.xml'
2122
- 'R/**'
23+
- '.github/workflows/r.yml'
2224

2325
env:
2426
MAVEN_OPTS: -Dmaven.wagon.httpconnectionManager.ttlSeconds=60

R/tests/testthat/test-data-interface-raster.R

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ test_that("Passed RS_Envelope with raster", {
132132
test_that("Passed RS_NumBands with raster", {
133133
## Load
134134
sdf_name <- random_string("spatial_sdf")
135-
binary_sdf <- spark_read_binary(sc, dir = test_data("raster"), name = sdf_name)
135+
binary_sdf <- spark_read_binary(sc, dir = test_data("raster/test3.tif"), name = sdf_name)
136136

137137
a <-
138138
binary_sdf %>%
@@ -142,14 +142,11 @@ test_that("Passed RS_NumBands with raster", {
142142
) %>%
143143
select(nbands) %>%
144144
collect()
145-
146145
expect_equal(
147146
a %>% as.list(),
148-
list(nbands = c(1, 1, 4))
149-
147+
list(nbands = c(4))
150148
)
151149

152-
153150
## Cleanup
154151
sc %>% DBI::dbExecute(paste0("DROP TABLE ", sdf_name))
155152
rm(a)
@@ -185,7 +182,7 @@ test_that("Passed RS_Value with raster", {
185182
test_that("Passed RS_Values with raster", {
186183
## Load
187184
sdf_name <- random_string("spatial_sdf")
188-
binary_sdf <- spark_read_binary(sc, dir = test_data("raster"), name = sdf_name)
185+
binary_sdf <- spark_read_binary(sc, dir = test_data("raster/test1.tiff"), name = sdf_name)
189186

190187
a <-
191188
binary_sdf %>%
@@ -195,10 +192,9 @@ test_that("Passed RS_Values with raster", {
195192
) %>%
196193
select(val) %>%
197194
collect()
198-
199195
expect_equal(
200196
a %>% as.list(),
201-
list(val = list(c(255, NA_real_), c(255, NA_real_), c(NA_real_, NA_real_)))
197+
list(val = list(c(255, NA_real_)))
202198

203199
)
204200

0 commit comments

Comments
 (0)