Skip to content

Commit 7c65fd5

Browse files
authored
Merge pull request #330 from GenieFramework/hh-testitems-2
switch to juliaci, update remaining workflows
2 parents 83b5de9 + 911bd1d commit 7c65fd5

11 files changed

Lines changed: 318 additions & 287 deletions

File tree

.github/workflows/CompatHelper.yml

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,42 @@ on:
33
schedule:
44
- cron: 0 0 * * *
55
workflow_dispatch:
6+
permissions:
7+
contents: write
8+
pull-requests: write
69
jobs:
710
CompatHelper:
811
runs-on: ubuntu-latest
912
steps:
10-
- name: Pkg.add("CompatHelper")
11-
run: julia -e 'using Pkg; Pkg.add("CompatHelper")'
12-
- name: CompatHelper.main()
13+
- name: Check if Julia is already available in the PATH
14+
id: julia_in_path
15+
run: which julia
16+
continue-on-error: true
17+
- name: Install Julia if needed
18+
if: steps.julia_in_path.outcome != 'success'
19+
uses: julia-actions/setup-julia@v2
20+
with:
21+
version: '1'
22+
arch: ${{ runner.arch }}
23+
- name: Add General registry via Git
24+
run: |
25+
import Pkg
26+
ENV["JULIA_PKG_SERVER"] = ""
27+
Pkg.Registry.add("General")
28+
shell: julia --color=yes {0}
29+
- name: Install CompatHelper
30+
run: |
31+
import Pkg
32+
name = "CompatHelper"
33+
uuid = "aa819f21-2bde-4658-8897-bab36330d9b7"
34+
version = "3"
35+
Pkg.add(; name, uuid, version)
36+
shell: julia --color=yes {0}
37+
- name: Run CompatHelper
1338
env:
1439
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1540
COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }}
16-
run: julia -e 'using CompatHelper; CompatHelper.main()'
41+
run: |
42+
import CompatHelper
43+
CompatHelper.main()
44+
shell: julia --color=yes {0}

.github/workflows/TagBot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot'
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: JuliaRegistries/TagBot@v1
12+
- uses: JuliaRegistries/TagBot@cded32665b34ca0496d3ac10a67d08ddfc726963 # v1.25.11
1313
with:
1414
token: ${{ secrets.GITHUB_TOKEN }}
1515
ssh: ${{ secrets.DOCUMENTER_KEY }}

.github/workflows/ci.yml

Lines changed: 0 additions & 61 deletions
This file was deleted.

.github/workflows/juliaci.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Julia CI
2+
3+
on:
4+
push:
5+
branches: [main, master]
6+
pull_request:
7+
types: [opened, synchronize, reopened, ready_for_review, converted_to_draft]
8+
issue_comment:
9+
types: [created]
10+
workflow_dispatch:
11+
inputs:
12+
feature:
13+
type: choice
14+
description: What to run
15+
options: [DocDeploy, LintAndTest, TagBot]
16+
17+
jobs:
18+
julia-ci:
19+
uses: julia-testitems/testitem-workflow/.github/workflows/juliaci.yml@v2
20+
with:
21+
include-windows-x86: false
22+
allow-failure: "*~x86,*:macos-26-intel"
23+
permissions: write-all
24+
secrets:
25+
codecov_token: ${{ secrets.CODECOV_TOKEN }}

Project.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,9 @@ julia = "1.6"
6262
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
6363
JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
6464
OffsetArrays = "6fe1bfb0-de20-5000-8ca7-80f57d26f881"
65+
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
6566
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
67+
TestItemRunner = "f8b46487-2199-4994-9208-9a1283c18c0a"
6668

6769
[targets]
68-
test = ["Test", "DataFrames", "JSON", "OffsetArrays"]
70+
test = ["Test", "DataFrames", "JSON", "OffsetArrays", "Reexport", "TestItemRunner"]

src/ParsingTools.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ function struct_to_dict(s::T, f::Union{Nothing, Function} = !isnothing) where T
2626
ftest = isnothing(f) ? x -> true : f
2727

2828
isempty(fieldnames(T)) && return s
29-
Dict{Symbol, Any}(k => struct_to_dict(v) for (k, v) in zip(fieldnames(T), getfield.(RefValue(s), fieldnames(T))) if ftest(v))
29+
Dict{Symbol, Any}(k => struct_to_dict(v) for (k, v) in zip(fieldnames(T), getfield.(Base.RefValue(s), fieldnames(T))) if ftest(v))
3030
end
3131

3232
function deserialize!(d::Dict{T, Any}) where T

src/Stipple.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ export render, htmldiv, js_attr, render_component
116116
export setchannel, getchannel
117117

118118
# compatibility with Observables 0.3
119-
isempty(methods(notify, Observables)) && (Base.notify(observable::AbstractObservable) = Observables.notify!(observable))
119+
isempty(methods(notify, Observables)) && (Base.notify(observable::AbstractObservable) = Observables.notify(observable))
120120

121121
include("TimeOut.jl")
122122
include("ParsingTools.jl")

src/Theme.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ Utility functions for working with themes.
33
"""
44
module Theme
55

6-
using Genie
7-
using Stipple
6+
import Genie
7+
import Stipple
8+
using Stipple.Elements: stylesheet
89

910
import Base.RefValue
1011

src/Typography.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ julia> Typography.header("Hello", size = 2)
2323
function header(args...; size::Int = 1, kwargs...)
2424
1 <= size <= 6 || error("Invalid header size - expected 1:6")
2525
func = getproperty(Genie.Renderer.Html, Symbol("h$size"))
26-
func(class="text-h$size", args...; kwargs...) |> ParsedHTMLString
26+
func(class="text-h$size", args...; kwargs...) |> Genie.Renderer.Html.ParsedHTMLString
2727
end
2828

2929
end

src/stipple/rendering.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ function js_mixin(m::Mixin, js_f, delim)
199199

200200
no_modifiers = isempty(prefix) && isempty(postfix) || js_f (js_methods, js_computed, js_watch)
201201
add_fixes(s) = Symbol(prefix, s, postfix)
202-
add_fixes(s::JSONText) = Symbol(s.s)
202+
add_fixes(s::JSONText) = Symbol(json(s))
203203
xx = collect_js([js_f(M)], delim; pre = strip, key_replacement = no_modifiers ? identity : add_fixes)
204204

205205
isempty(prefix) && isempty(postfix) && return xx

0 commit comments

Comments
 (0)