Update CompatHelper defaults and add some customization

This commit is contained in:
Chris de Graaf 2020-02-15 20:45:08 +07:00
parent abbfdb00ea
commit 506d0d33da
No known key found for this signature in database
GPG Key ID: 150FFDD9B0073C7B
9 changed files with 18 additions and 12 deletions

View File

@ -2,6 +2,7 @@
CompatHelper(;
file="$(contractuser(default_file("github", "workflows", "CompatHelper.yml")))",
destination="CompatHelper.yml",
cron="0 0 * * *",
)
Integrates your packages with [CompatHelper](https://github.com/bcbi/CompatHelper.jl) via GitHub Actions.
@ -10,10 +11,12 @@ Integrates your packages with [CompatHelper](https://github.com/bcbi/CompatHelpe
- `file::AbstractString`: Template file for the workflow file.
- `destination::AbstractString`: Destination of the workflow file,
relative to `.github/workflows`.
- `cron::AbstractString`: Cron expression for the schedule interval.
"""
@with_kw_noshow struct CompatHelper <: BasicPlugin
file::String = default_file("github", "workflows", "CompatHelper.yml")
destination::String = "CompatHelper.yml"
cron::String = "0 0 * * *"
end
source(p::CompatHelper) = p.file
@ -21,5 +24,6 @@ destination(p::CompatHelper) = joinpath(".github", "workflows", p.destination)
tags(::CompatHelper) = "<<", ">>"
view(p::CompatHelper, t::Template, ::AbstractString) = Dict(
"VERSION" => format_version(max(v"1.2", t.julia)),
"CRON" => p.cron,
"VERSION" => format_version(max(v"1.3", t.julia)),
)

View File

@ -1,7 +1,7 @@
name: CompatHelper
on:
schedule:
- cron: 0 * * * *
- cron: <<&CRON>>
jobs:
build:
runs-on: ubuntu-latest

View File

@ -1,14 +1,14 @@
name: CompatHelper
on:
schedule:
- cron: 0 * * * *
- cron: 0 0 * * *
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: julia-actions/setup-julia@latest
with:
version: 1.2
version: 1.3
- name: Pkg.add("CompatHelper")
run: julia -e 'using Pkg; Pkg.add("CompatHelper")'
- name: CompatHelper.main()

View File

@ -1,14 +1,14 @@
name: CompatHelper
on:
schedule:
- cron: 0 * * * *
- cron: 0 0 * * *
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: julia-actions/setup-julia@latest
with:
version: 1.2
version: 1.3
- name: Pkg.add("CompatHelper")
run: julia -e 'using Pkg; Pkg.add("CompatHelper")'
- name: CompatHelper.main()

View File

@ -1,14 +1,14 @@
name: CompatHelper
on:
schedule:
- cron: 0 * * * *
- cron: 0 0 * * *
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: julia-actions/setup-julia@latest
with:
version: 1.2
version: 1.3
- name: Pkg.add("CompatHelper")
run: julia -e 'using Pkg; Pkg.add("CompatHelper")'
- name: CompatHelper.main()

View File

@ -1,14 +1,14 @@
name: CompatHelper
on:
schedule:
- cron: 0 * * * *
- cron: 0 0 * * *
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: julia-actions/setup-julia@latest
with:
version: 1.2
version: 1.3
- name: Pkg.add("CompatHelper")
run: julia -e 'using Pkg; Pkg.add("CompatHelper")'
- name: CompatHelper.main()

View File

@ -1,14 +1,14 @@
name: CompatHelper
on:
schedule:
- cron: 0 * * * *
- cron: 0 0 */3 * *
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: julia-actions/setup-julia@latest
with:
version: 1.2
version: 1.3
- name: Pkg.add("CompatHelper")
run: julia -e 'using Pkg; Pkg.add("CompatHelper")'
- name: CompatHelper.main()

View File

@ -63,6 +63,7 @@ end
CirrusCI(; image="freebsd-123", coverage=false, extra_versions=["1.1"]),
Citation(; readme=true),
Codecov(; file=STATIC_FILE),
CompatHelper(; cron="0 0 */3 * *"),
Coveralls(; file=STATIC_FILE),
Documenter{GitLabCI}(
assets=[STATIC_FILE],

View File

@ -24,6 +24,7 @@ const LICENSES_DIR = joinpath(TEMPLATES_DIR, "licenses")
CompatHelper:
file: "$(joinpath(TEMPLATES_DIR, "github", "workflows", "CompatHelper.yml"))"
destination: "CompatHelper.yml"
cron: "0 0 * * *"
Git:
ignore: String[]
ssh: false