Skip to content

Commit 9119bef

Browse files
authored
CI (#5)
* try fix 1 * fix typo * try fix 2 * try fix 3 * wip * wip * wip * fix draw_features for small rasters
1 parent 0ac2be6 commit 9119bef

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

.github/workflows/CI.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,15 @@ jobs:
1616
- 'nightly'
1717
os:
1818
- ubuntu-latest
19-
- macOS-latest
20-
- windows-latest
2119
arch:
2220
- x64
23-
- x86
24-
exclude:
25-
- os: macOS-latest
26-
arch: x86
2721
steps:
2822
- uses: actions/checkout@v2
2923
- uses: julia-actions/setup-julia@v2
3024
with:
3125
version: ${{ matrix.version }}
3226
arch: ${{ matrix.arch }}
27+
- run: sudo apt-get update && sudo apt-get install -y xorg-dev mesa-utils xvfb libgl1 freeglut3-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev
3328
- uses: actions/cache@v1
3429
env:
3530
cache-name: cache-artifacts
@@ -41,7 +36,13 @@ jobs:
4136
${{ runner.os }}-test-
4237
${{ runner.os }}-
4338
- uses: julia-actions/julia-buildpkg@v1
44-
- uses: julia-actions/julia-runtest@v1
39+
- name: Run Tests
40+
continue-on-error: false
41+
env:
42+
RASTERDATASOURCES_PATH: "."
43+
run: >
44+
DISPLAY=:0 xvfb-run -s '-screen 0 1024x768x24' julia --color=yes --project=. -e 'using Pkg; Pkg.test("InteractiveGeospatial", coverage=true)'
45+
&& echo "TESTS_SUCCESSFUL=true" >> $GITHUB_ENV
4546
- uses: julia-actions/julia-processcoverage@v1
4647
- uses: codecov/codecov-action@v1
4748
with:

Project.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ julia = "1.10"
2323
[extras]
2424
ArchGDAL = "c9ce4bd3-c3d5-55b8-8973-c0e20141b8c3"
2525
GeoJSON = "61d90e0f-e114-555e-ac52-39dfb47a3ef9"
26-
RasterDataSources = "3cb90ccd-e1b6-4867-9617-4276c8b2ca36"
2726
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
2827

2928
[targets]
30-
test = ["Test", "ArchGDAL", "RasterDataSources", "GeoJSON"]
29+
test = ["Test", "ArchGDAL", "GeoJSON"]

src/InteractiveGeospatial.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ function draw_features(r)
7676
sublabel(text) = Label(fig, text, fontsize=10, halign=:left, padding = (0,0,-15,0), color=:gray)
7777

7878
# `aggregate` Inputs
79-
init_scale = round(Int, maximum(size(r)) / 1000)
79+
init_scale = max(1, round(Int, maximum(size(r)) / 1000))
8080
scale = Textbox(fig; stored_string=string(init_scale), validator=Int, width=ui_width)
8181
aggregate_fun = menu(sum, mean, minimum, maximum)
8282

test/runtests.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
using Test, InteractiveGeospatial, Rasters, ArchGDAL, RasterDataSources, GeoJSON, GLMakie, Markdown
1+
using Test, InteractiveGeospatial, Rasters, ArchGDAL, GeoJSON, GLMakie, Markdown
22

33

4-
files = getraster(WorldClim{Climate}, :wind; month=1:12)
4+
file = download("https://github.com/yeesian/ArchGDALDatasets/raw/master/pyrasterio/example.tif")
55

6-
r = Raster(files[1])
6+
r = Raster(file)
77

88
features = draw_features(r)
99

0 commit comments

Comments
 (0)