Skip to content

Commit

Permalink
ci: update ci config (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
inkydragon authored Dec 16, 2024
1 parent db79c84 commit 69ffaa7
Show file tree
Hide file tree
Showing 7 changed files with 114 additions and 60 deletions.
11 changes: 11 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
comment: false # Disable the comment that is posted on pull requests.
coverage:
status:
patch:
default:
only_pulls: true # Only show the `codecov/patch` commit status on pull requests.
project:
default:
only_pulls: true # Only show the `codecov/project` commit status on pull requests.
github_checks:
annotations: false # Disable the annotations in the "Files Changed" view of a pull request.
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/" # Location of package manifests
schedule:
# weekly, monthly
interval: "monthly"
16 changes: 16 additions & 0 deletions .github/workflows/CompatHelper.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: CompatHelper
on:
schedule:
- cron: '0 0 * * *' # Everyday at midnight
workflow_dispatch:
jobs:
CompatHelper:
runs-on: ubuntu-latest
steps:
- name: Pkg.add("CompatHelper")
run: julia -e 'using Pkg; Pkg.add("CompatHelper")'
- name: CompatHelper.main()
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }}
run: julia -e 'using CompatHelper; CompatHelper.main()'
91 changes: 55 additions & 36 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,76 +1,95 @@
name: CI
on:
pull_request:
branches:
- 'main'
- 'release-*'
push:
branches:
- 'main'
- 'release-*'
tags: '*'
tags: ['*']
pull_request:
workflow_dispatch:
concurrency:
# Skip intermediate builds: all builds except for builds on the `main` or `release-*` branches
# Cancel intermediate builds: only pull request builds
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.ref != 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release-') || github.run_number }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }}
runs-on: ${{ matrix.os }}
permissions: # needed to allow julia-actions/cache to proactively delete old caches that it has created
actions: write
contents: read
strategy:
fail-fast: false
matrix:
version:
- '1.6'
- '1.7'
- 'nightly'
os:
- ubuntu-latest
- macOS-latest
- macos-13 # Intel
- windows-latest
arch:
- x64
- x86
- 'x64'
- 'x86'
version:
- '1.6' # compat
- 'lts'
- 'nightly'
exclude:
- os: macOS-latest
- os: macos-13 # Intel
arch: x86
include:
# macos-latest -> Apple Silicon (Need julia >= v1.8)
- os: macos-latest # Apple Silicon
arch: 'aarch64'
version: 'lts'
- os: macos-latest # Apple Silicon
arch: 'aarch64'
version: 'nightly'
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-${{ matrix.os }}
${{ runner.os }}-
- uses: julia-actions/cache@v2
- run: julia --color=yes .ci/test_and_change_uuid.jl
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v1
- uses: codecov/codecov-action@v5
with:
file: lcov.info
token: ${{ secrets.CODECOV_TOKEN }}
files: lcov.info

docs:
permissions: write-all
name: Documentation
runs-on: ubuntu-latest
permissions:
# needed to allow julia-actions/cache to proactively delete old caches that it has created
actions: write
contents: write
statuses: write
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@latest
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
# version: '1.6'
version: 'nightly'
- name: Generate docs
- uses: julia-actions/cache@v2
- run: julia --color=yes .ci/test_and_change_uuid.jl
- name: Configure doc environment
shell: julia --project=docs --color=yes {0}
run: |
using Pkg
Pkg.develop(PackageSpec(path=pwd()))
Pkg.instantiate()
- uses: julia-actions/julia-buildpkg@v1
- name: Run doctests
shell: julia --project=docs --color=yes {0}
run: |
julia --color=yes -e 'write("Project.toml", replace(read("Project.toml", String), r"uuid = .*?\n" =>"uuid = \"9bb1440f-4735-579b-a4ab-409b98df4dab\"\n"));'
julia --project --color=yes -e 'using Pkg; Pkg.activate("docs"); Pkg.instantiate(); Pkg.develop(PackageSpec(path = pwd()))'
julia --project=docs --color=yes docs/make.jl pdf
using Documenter: DocMeta, doctest
using DelimitedFiles
DocMeta.setdocmeta!(DelimitedFiles, :DocTestSetup, :(using DelimitedFiles); recursive=true)
doctest(DelimitedFiles)
- uses: julia-actions/julia-docdeploy@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
docs/build
docs/Manifest.toml
/Manifest.toml
18 changes: 3 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,7 @@
# DelimitedFiles

| **Documentation** | **Build Status** |
|:-----------------------------------------------------------------:|:-----------------------------------------------------------------------------------------------:|
| [![][docs-img]][docs-url] | [![][ci-img]][ci-url] [![][codecov-img]][codecov-url] |

[docs-img]: https://img.shields.io/badge/docs-blue.svg
[docs-url]: http://delimitedfiles.juliadata.org/dev/

[docs-v1-img]: https://img.shields.io/badge/docs-v1-blue.svg
[docs-v1-url]: https://julialang.github.io/delimitedfiles/v1/

[ci-img]: https://github.com/JuliaLang/delimitedfiles.jl/workflows/CI/badge.svg?branch=main
[ci-url]: https://github.com/JuliaLang/delimitedfiles.jl/actions?query=workflow%3A%22CI%22

[codecov-img]: https://codecov.io/gh/JuliaLang/delimitedfiles.jl/branch/main/graph/badge.svg
[codecov-url]: https://codecov.io/gh/JuliaLang/delimitedfiles.jl
[![](https://img.shields.io/badge/docs-dev-blue.svg)](http://delimitedfiles.juliadata.org/dev/)
[![CI](https://github.com/JuliaData/DelimitedFiles.jl/actions/workflows/ci.yml/badge.svg)](https://github.com/JuliaData/DelimitedFiles.jl/actions/workflows/ci.yml)
[![codecov](https://codecov.io/gh/JuliaLang/delimitedfiles.jl/graph/badge.svg?token=t34xJrFp7a)](https://codecov.io/gh/JuliaLang/delimitedfiles.jl)

This package ships as part of the Julia stdlib.
27 changes: 18 additions & 9 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,16 +1,25 @@
using DelimitedFiles
using Documenter: DocMeta, makedocs, deploydocs
using Documenter

DocMeta.setdocmeta!(DelimitedFiles, :DocTestSetup, :(using DelimitedFiles); recursive=true)

makedocs(
makedocs(;
modules = [DelimitedFiles],
sitename = "DelimitedFiles",
sitename = "DelimitedFiles.jl",
format=Documenter.HTML(
prettyurls = get(ENV, "CI", nothing) == "true",
canonical = "https://delimitedfiles.juliadata.org/",
edit_link="main",
assets=String[],
),
pages = Any[
"DelimitedFiles" => "index.md"
];
# strict = true,
strict = Symbol[:doctest],
)
"Home" => "index.md"
],
warnonly = :missing_docs,
)

deploydocs(repo = "github.com/JuliaData/DelimitedFiles.jl.git")
deploydocs(;
repo = "github.com/JuliaData/DelimitedFiles.jl",
versions = ["v#.#", "dev" => "dev"],
push_preview = true,
)

0 comments on commit 69ffaa7

Please sign in to comment.