Skip to content

Fix CI: Update deprecated GitHub Actions and GeoInterface compatibility #15

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jun 16, 2025
Merged
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
16 changes: 16 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: 2
updates:
# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
open-pull-requests-limit: 10
labels:
- "dependencies"
- "github-actions"
# Groups all github-actions updates into a single PR
groups:
github-actions:
patterns:
- "*"
93 changes: 73 additions & 20 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -1,48 +1,101 @@
name: CI

on:
push:
branches: [main]
tags: ["*"]
branches:
- main
- master
pull_request:
branches:
- main
- master

# Required permissions for modern Julia CI
permissions:
actions: write # Required for julia-actions/cache
contents: read # Basic repository read access
pull-requests: read
statuses: write

jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
version:
- '1' # automatically expands to the latest stable 1.x release of Julia
- 'nightly'
- 'lts' # Latest LTS release
- '1' # Latest stable 1.x release
- 'pre' # Pre-release (nightly)
os:
- ubuntu-latest
- macOS-latest
- windows-latest
arch:
- x64
- x86
exclude:
# Exclude some combinations to save CI time
- os: macOS-latest
arch: x86
version: 'pre'
- os: windows-latest
version: 'pre'

steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
# Update to v4 to avoid Node.js deprecation warnings
- uses: actions/checkout@v4

# Update to v2 for modern Julia support
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: actions/cache@v1
env:
cache-name: cache-artifacts
with:
path: ~/.julia/artifacts
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
restore-keys: |
${{ runner.os }}-test-${{ env.cache-name }}-
${{ runner.os }}-test-
${{ runner.os }}-

# Use julia-actions/cache for better Julia-specific caching
- uses: julia-actions/cache@v2

# Build package dependencies
- uses: julia-actions/julia-buildpkg@v1

# Run tests with annotations for better error reporting
- uses: julia-actions/julia-runtest@v1
with:
annotate: true

# Process coverage data
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v1

# Upload coverage to Codecov (update to v4)
- uses: codecov/codecov-action@v5
with:
file: lcov.info
files: lcov.info
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false

# Documentation job - commented out until docs/ folder exists
# docs:
# name: Documentation
# runs-on: ubuntu-latest
# permissions:
# contents: write
# pull-requests: read
# statuses: write
# steps:
# - uses: actions/checkout@v4
# - uses: julia-actions/setup-julia@v2
# with:
# version: '1'
# - uses: julia-actions/cache@v2
# - name: Configure doc environment
# shell: julia --color=yes --project=docs {0}
# run: |
# using Pkg
# Pkg.develop(PackageSpec(path=pwd()))
# Pkg.instantiate()
# - name: Build and deploy documentation
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
# run: |
# julia --color=yes --project=docs docs/make.jl
7 changes: 7 additions & 0 deletions src/KML.jl
Original file line number Diff line number Diff line change
Expand Up @@ -726,4 +726,11 @@ for T in vcat(all_concrete_subtypes(KMLElement), all_abstract_subtypes(Object))
end
end

# Add this type-level implementation for GeoInterface v1.x
GeoInterface.isgeometry(::Type{<:Geometry}) = true

# Add the missing ncoord implementations for GeoInterface v1.x
GeoInterface.ncoord(::GeoInterface.LineStringTrait, ls::LineString) = 2
GeoInterface.ncoord(::GeoInterface.LinearRingTrait, lr::LinearRing) = 2

end #module
Loading