Skip to content

Commit

Permalink
CI (#5)
Browse files Browse the repository at this point in the history
* try fix 1

* fix typo

* try fix 2

* try fix 3

* wip

* wip

* wip

* fix draw_features for small rasters
  • Loading branch information
joshday authored Sep 11, 2024
1 parent 0ac2be6 commit 9119bef
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,15 @@ jobs:
- 'nightly'
os:
- ubuntu-latest
- macOS-latest
- windows-latest
arch:
- x64
- x86
exclude:
- os: macOS-latest
arch: x86
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- 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
- uses: actions/cache@v1
env:
cache-name: cache-artifacts
Expand All @@ -41,7 +36,13 @@ jobs:
${{ runner.os }}-test-
${{ runner.os }}-
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
- name: Run Tests
continue-on-error: false
env:
RASTERDATASOURCES_PATH: "."
run: >
DISPLAY=:0 xvfb-run -s '-screen 0 1024x768x24' julia --color=yes --project=. -e 'using Pkg; Pkg.test("InteractiveGeospatial", coverage=true)'
&& echo "TESTS_SUCCESSFUL=true" >> $GITHUB_ENV
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v1
with:
Expand Down
3 changes: 1 addition & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ julia = "1.10"
[extras]
ArchGDAL = "c9ce4bd3-c3d5-55b8-8973-c0e20141b8c3"
GeoJSON = "61d90e0f-e114-555e-ac52-39dfb47a3ef9"
RasterDataSources = "3cb90ccd-e1b6-4867-9617-4276c8b2ca36"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Test", "ArchGDAL", "RasterDataSources", "GeoJSON"]
test = ["Test", "ArchGDAL", "GeoJSON"]
2 changes: 1 addition & 1 deletion src/InteractiveGeospatial.jl
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ function draw_features(r)
sublabel(text) = Label(fig, text, fontsize=10, halign=:left, padding = (0,0,-15,0), color=:gray)

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

Expand Down
6 changes: 3 additions & 3 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using Test, InteractiveGeospatial, Rasters, ArchGDAL, RasterDataSources, GeoJSON, GLMakie, Markdown
using Test, InteractiveGeospatial, Rasters, ArchGDAL, GeoJSON, GLMakie, Markdown


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

r = Raster(files[1])
r = Raster(file)

features = draw_features(r)

Expand Down

0 comments on commit 9119bef

Please sign in to comment.