From 257e7a7fb8656bcc8a1611dff55b4c878819bdfa Mon Sep 17 00:00:00 2001 From: mathieu17g Date: Fri, 13 Jun 2025 20:14:40 +0200 Subject: [PATCH 1/6] Fix CI: Update deprecated GitHub Actions --- .github/dependabot.yml | 16 ++++++ .github/workflows/CI.yml | 109 ++++++++++++++++++++++++++++++++------- 2 files changed, 105 insertions(+), 20 deletions(-) create mode 100644 .github/dependabot.yml 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..e5743ba 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -1,48 +1,117 @@ name: CI + on: push: - branches: [main] - tags: ["*"] + branches: + - main + - master pull_request: + branches: + - main + - master + +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 + - uses: actions/checkout@v4 + + - 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 }}- + + - 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 + - uses: codecov/codecov-action@v4 with: - file: lcov.info + files: lcov.info + token: ${{ secrets.CODECOV_TOKEN }} + fail_ci_if_error: false + + # Upload coverage to Coveralls + - uses: coverallsapp/github-action@v2 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + path-to-lcov: lcov.info + flag-name: run-${{ matrix.os }}-${{ matrix.version }} + parallel: true + + # Finalize Coveralls parallel builds + finish: + needs: test + if: always() + runs-on: ubuntu-latest + steps: + - name: Coveralls Finished + uses: coverallsapp/github-action@v2 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + parallel-finished: true + + # Documentation job + 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 From 9b247e957d5441284dd7f0b7d085ae68fcf34925 Mon Sep 17 00:00:00 2001 From: mathieu17g Date: Fri, 13 Jun 2025 20:30:13 +0200 Subject: [PATCH 2/6] Fix CI: Remove docs job that doesn't exist yet --- .github/workflows/CI.yml | 80 ++++++++++++++++------------------------ 1 file changed, 32 insertions(+), 48 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index e5743ba..8f8cb62 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -10,6 +10,7 @@ on: - main - master +# Required permissions for modern Julia CI permissions: actions: write # Required for julia-actions/cache contents: read # Basic repository read access @@ -42,13 +43,16 @@ jobs: version: 'pre' steps: + # 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 }} + # Use julia-actions/cache for better Julia-specific caching - uses: julia-actions/cache@v2 # Build package dependencies @@ -62,56 +66,36 @@ jobs: # Process coverage data - uses: julia-actions/julia-processcoverage@v1 - # Upload coverage to Codecov + # Upload coverage to Codecov (update to v4) - uses: codecov/codecov-action@v4 with: files: lcov.info - token: ${{ secrets.CODECOV_TOKEN }} + # token: ${{ secrets.CODECOV_TOKEN }} # Not required for public repos fail_ci_if_error: false - - # Upload coverage to Coveralls - - uses: coverallsapp/github-action@v2 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - path-to-lcov: lcov.info - flag-name: run-${{ matrix.os }}-${{ matrix.version }} - parallel: true - - # Finalize Coveralls parallel builds - finish: - needs: test - if: always() - runs-on: ubuntu-latest - steps: - - name: Coveralls Finished - uses: coverallsapp/github-action@v2 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - parallel-finished: true - # Documentation job - 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 + # 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 From e0e30a58cee87ee99a733037da378a6207984a14 Mon Sep 17 00:00:00 2001 From: mathieu17g Date: Fri, 13 Jun 2025 23:45:29 +0200 Subject: [PATCH 3/6] Fix CI: GeoInterface v1.x compatibility --- src/KML.jl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/KML.jl b/src/KML.jl index afef697..c25e2a4 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 From 3f1a384fa2e0c3f300215bfe56ae87f7385a9b2f Mon Sep 17 00:00:00 2001 From: mathieu17g Date: Sat, 14 Jun 2025 00:00:54 +0200 Subject: [PATCH 4/6] Trigger CI with codecov token --- src/KML.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/KML.jl b/src/KML.jl index c25e2a4..88632d0 100644 --- a/src/KML.jl +++ b/src/KML.jl @@ -726,10 +726,10 @@ for T in vcat(all_concrete_subtypes(KMLElement), all_abstract_subtypes(Object)) end end -# Add this type-level implementation for GeoInterface v1.x +# Add this type-level implementation for GeoInterface v1.x GeoInterface.isgeometry(::Type{<:Geometry}) = true -# Add the missing ncoord implementations for GeoInterface v1.x +# Add the missing ncoord implementations for GeoInterface v1.x GeoInterface.ncoord(::GeoInterface.LineStringTrait, ls::LineString) = 2 GeoInterface.ncoord(::GeoInterface.LinearRingTrait, lr::LinearRing) = 2 From f9f61b3b33fa0eeef62dc1d8814b51f4ecb98786 Mon Sep 17 00:00:00 2001 From: mathieu17g Date: Sat, 14 Jun 2025 00:05:58 +0200 Subject: [PATCH 5/6] Uncomment CodeCov token line in CI.yml --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 8f8cb62..8cdad93 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -70,7 +70,7 @@ jobs: - uses: codecov/codecov-action@v4 with: files: lcov.info - # token: ${{ secrets.CODECOV_TOKEN }} # Not required for public repos + token: ${{ secrets.CODECOV_TOKEN }} fail_ci_if_error: false # Documentation job - commented out until docs/ folder exists From 9f2b0276c926fb857a7a89964ed4b53b05771fe2 Mon Sep 17 00:00:00 2001 From: mathieu17g Date: Sat, 14 Jun 2025 00:32:14 +0200 Subject: [PATCH 6/6] Fix CI: upgrade CodeCov action to v5 --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 8cdad93..cf330c4 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -67,7 +67,7 @@ jobs: - uses: julia-actions/julia-processcoverage@v1 # Upload coverage to Codecov (update to v4) - - uses: codecov/codecov-action@v4 + - uses: codecov/codecov-action@v5 with: files: lcov.info token: ${{ secrets.CODECOV_TOKEN }}