Skip to content

Commit

Permalink
Update CI and fix readme links (#201)
Browse files Browse the repository at this point in the history
* fix readme links

* update CI and add downstream tests

* mark broken tests

* Add downstream tests for OSMToolset
  • Loading branch information
nhz2 authored Oct 26, 2024
1 parent 57ffce2 commit daf1bf3
Show file tree
Hide file tree
Showing 6 changed files with 101 additions and 43 deletions.
66 changes: 42 additions & 24 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -1,43 +1,61 @@
name: CI

on:
- push
- pull_request
push:
branches:
- master
pull_request:
branches:
- master

jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }}
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
version:
- '1.6'
- 'nightly'
- '1.10'
- '1'
- 'pre'
os:
- ubuntu-latest
- macOS-latest
- windows-latest
arch:
- x86
- x64
exclude:
- os: macOS-latest
- 'x64'
- 'x86'
include:
- os: ubuntu-latest
version: '1.6'
arch: x64
- os: ubuntu-latest
version: '1.6'
arch: x86
- os: macOS-13
version: '1'
arch: x64
- os: macOS-13
version: 'pre'
arch: x64
- os: macOS-14
version: '1'
arch: aarch64
- os: macOS-14
version: 'pre'
arch: aarch64
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v1
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: julia-actions/julia-buildpkg@latest
- uses: julia-actions/julia-runtest@latest
- name: Emit coverage file
shell: bash
run: |
julia <<CODE
using Pkg
Pkg.add("Coverage")
using Coverage
LCOV.writefile("lcov.txt", process_folder())
CODE
- uses: codecov/codecov-action@v3
show-versioninfo: true
- uses: julia-actions/cache@v2
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v4
with:
file: ./lcov.txt
token: ${{ secrets.CODECOV_TOKEN }} # required
file: lcov.info
42 changes: 42 additions & 0 deletions .github/workflows/Downstream.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Downstream
on:
push:
branches: [master]
tags: [v*]
pull_request:

jobs:
test:
name: ${{ matrix.package }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
package:
- "Genie"
- "OSMToolset"
- "PPTX"
- "Serde"
- "XLSX"
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: 1
arch: x64
show-versioninfo: true
- uses: julia-actions/julia-buildpkg@latest
- name: Load this and run the downstream tests
shell: julia --color=yes {0}
run: |
using Pkg
Pkg.Registry.update()
Pkg.activate(;temp=true)
# force it to use this PR's version of the package
ENV["JULIA_PKG_DEVDIR"]= mktempdir()
Pkg.develop([
PackageSpec(path="."),
PackageSpec(name="${{ matrix.package }}"),
])
Pkg.update()
Pkg.test("${{ matrix.package }}")
8 changes: 0 additions & 8 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,3 @@ XML2_jll = "02c8fc9c-b97f-50b9-bbe4-9be30ff0a78a"
Printf = "1.3"
XML2_jll = "2.9"
julia = "1.6"

[extras]
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
Logging = "56ddb016-857b-54e1-b83d-db4d58db5568"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Aqua", "Test", "Logging"]
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,13 +149,13 @@ Other XML/HTML packages in Julia
--------------------------------

* [LightXML.jl](https://github.com/JuliaIO/LightXML.jl)
* [LibExpat.jl](https://github.com/amitmurthy/LibExpat.jl)
* [LibExpat.jl](https://github.com/JuliaIO/LibExpat.jl)

[docs-stable-img]: https://img.shields.io/badge/docs-stable-blue.svg
[docs-stable-url]: https://juliaio.github.io/EzXML.jl/stable
[docs-latest-img]: https://img.shields.io/badge/docs-latest-blue.svg
[docs-latest-url]: https://juliaio.github.io/EzXML.jl/latest
[codecov-img]: http://codecov.io/github/juliaio/EzXML.jl/coverage.svg?branch=master
[codecov-url]: http://codecov.io/github/juliaio/EzXML.jl?branch=master
[ci-status-img]: https://github.com/juliaio/EzXML.jl/workflows/CI/badge.svg
[ci-status-url]: https://github.com/juliaio/EzXML.jl/actions
[codecov-img]: https://codecov.io/gh/JuliaIO/EzXML.jl/branch/master/graph/badge.svg?token=ghRtgNZUhC
[codecov-url]: https://codecov.io/gh/JuliaIO/EzXML.jl
[ci-status-img]: https://github.com/JuliaIO/EzXML.jl/actions/workflows/CI.yml/badge.svg?branch=master
[ci-status-url]: https://github.com/JuliaIO/EzXML.jl/actions/workflows/CI.yml
5 changes: 5 additions & 0 deletions test/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[deps]
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
EzXML = "8f5d6c58-4d21-5cfd-889c-e3ad7ee6a615"
Logging = "56ddb016-857b-54e1-b83d-db4d58db5568"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
13 changes: 7 additions & 6 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
using EzXML
using Test
using Logging: SimpleLogger, with_logger
using Aqua: Aqua

Aqua.test_all(EzXML; ambiguities=false)

# Capture logging messages using a local logger.
function capture_logging_messages(proc)
Expand Down Expand Up @@ -183,7 +186,7 @@ end
_, messages = capture_logging_messages() do
@test_throws EzXML.XMLError parsexml("<gepa?>jgo<<<><<")
end
@test occursin("caught 4 errors; throwing the first one", messages)
@test occursin("errors; throwing the first one", messages)
end

@testset "HTML" begin
Expand Down Expand Up @@ -372,8 +375,9 @@ end
@test reader.content == "Hey"
@test reader.namespace == "http://www.w3.org/1999/xhtml"
elseif reader.:type == EzXML.READER_END_ELEMENT
@test !hasnodecontent(reader)
@test reader.content === nothing
# This is broken in XML2_jll 2.13.4 but works in 2.12.7
@test_broken !hasnodecontent(reader)
@test_broken reader.content === nothing
end
end
@test "head" names
Expand Down Expand Up @@ -1462,6 +1466,3 @@ if "stress" in ARGS
swap_xml()
end

using Aqua

Aqua.test_all(EzXML; ambiguities=false)

0 comments on commit daf1bf3

Please sign in to comment.