diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..78594b4 --- /dev/null +++ b/.github/dependabot.yml @@ -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: + - "*" \ No newline at end of file diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 4ef7821..cf330c4 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -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 \ No newline at end of file diff --git a/src/KML.jl b/src/KML.jl index afef697..88632d0 100644 --- a/src/KML.jl +++ b/src/KML.jl @@ -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