diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..4014578 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,8 @@ +# see https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + # Check for updates to GitHub Actions every month + interval: "monthly" diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml new file mode 100644 index 0000000..1271f83 --- /dev/null +++ b/.github/workflows/CI.yml @@ -0,0 +1,53 @@ +# from https://discourse.julialang.org/t/easy-workflow-file-for-setting-up-github-actions-ci-for-your-julia-package/49765 + +name: CI +on: + pull_request: + branches: + - master + push: + branches: + - master + tags: '*' +jobs: + test: + name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + version: + - 'min' # the minimum Julia version that your package supports + - '1' # will automatically expand to the latest stable 1.x release of Julia. + # NOTE: CI on nightly is not enabled by default, uncomment if you need it. Cf the discussion at + # https://discourse.julialang.org/t/why-do-packages-run-continuous-integration-tests-on-julia-nightly/101208/3 + # - 'nightly' + os: + - ubuntu-latest + arch: + - x64 + steps: + - uses: actions/checkout@v4 + - uses: julia-actions/setup-julia@v2 + with: + version: ${{ matrix.version }} + arch: ${{ matrix.arch }} + - uses: actions/cache@v4 + 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/julia-buildpkg@v1 + - uses: julia-actions/julia-runtest@v1 + - uses: julia-actions/julia-processcoverage@v1 + - uses: codecov/codecov-action@v5 + with: + file: lcov.info + # NOTE: you need to add the token to Github secrets, see + # https://docs.codecov.com/docs/adding-the-codecov-token + token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/CompatHelper.yml b/.github/workflows/CompatHelper.yml index cba9134..ecc5b66 100644 --- a/.github/workflows/CompatHelper.yml +++ b/.github/workflows/CompatHelper.yml @@ -1,16 +1,47 @@ +# see the docs at https://github.com/JuliaRegistries/CompatHelper.jl + name: CompatHelper on: schedule: - cron: 0 0 * * * workflow_dispatch: +permissions: + contents: write + pull-requests: write jobs: CompatHelper: runs-on: ubuntu-latest steps: - - name: Pkg.add("CompatHelper") - run: julia -e 'using Pkg; Pkg.add("CompatHelper")' - - name: CompatHelper.main() + - name: Check if Julia is already available in the PATH + id: julia_in_path + run: which julia + continue-on-error: true + - name: Install Julia, but only if it is not already available in the PATH + uses: julia-actions/setup-julia@v2 + with: + version: '1' + arch: ${{ runner.arch }} + if: steps.julia_in_path.outcome != 'success' + - name: "Add the General registry via Git" + run: | + import Pkg + ENV["JULIA_PKG_SERVER"] = "" + Pkg.Registry.add("General") + shell: julia --color=yes {0} + - name: "Install CompatHelper" + run: | + import Pkg + name = "CompatHelper" + uuid = "aa819f21-2bde-4658-8897-bab36330d9b7" + version = "3" + Pkg.add(; name, uuid, version) + shell: julia --color=yes {0} + - name: "Run CompatHelper" + run: | + import CompatHelper + CompatHelper.main() + shell: julia --color=yes {0} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }} - run: julia -e 'using CompatHelper; CompatHelper.main()' + # COMPATHELPER_PRIV: ${{ secrets.COMPATHELPER_PRIV }} diff --git a/.github/workflows/Docs.yml b/.github/workflows/Docs.yml index 7208c9f..f6a2f00 100644 --- a/.github/workflows/Docs.yml +++ b/.github/workflows/Docs.yml @@ -1,31 +1,27 @@ -name: Docs +# see https://juliadocs.github.io/Documenter.jl/dev/man/hosting/#GitHub-Actions +# add this file to the repository once you set up authentication as described in the Documenter manual + +name: Documentation + on: push: branches: - master - tags: - - '*' + tags: '*' + pull_request: + jobs: - docs: - name: Documentation + build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: julia-actions/setup-julia@v1 + - uses: actions/checkout@v4 + - uses: julia-actions/setup-julia@latest with: - version: '1' - - run: | - julia --project=docs -e ' - using Pkg - Pkg.develop(PackageSpec(path=pwd())) - Pkg.instantiate()' - - run: | - julia --project=docs -e ' - using Documenter: DocMeta, doctest - using FredData - DocMeta.setdocmeta!(FredData, :DocTestSetup, :(using FredData); recursive=true) - doctest(FredData)' - - run: julia --project=docs docs/make.jl + version: '1.10' + - name: Install dependencies + run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()' + - name: Build and deploy env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # If authenticating with GitHub Actions token + DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # If authenticating with SSH deploy key + run: julia --project=docs/ docs/make.jl diff --git a/.github/workflows/TagBot.yml b/.github/workflows/TagBot.yml index f49313b..1e38163 100644 --- a/.github/workflows/TagBot.yml +++ b/.github/workflows/TagBot.yml @@ -1,9 +1,27 @@ +# see the docs at https://github.com/JuliaRegistries/TagBot + name: TagBot on: issue_comment: types: - created workflow_dispatch: + inputs: + lookback: + default: 3 +permissions: + actions: read + checks: read + contents: write + deployments: read + issues: read + discussions: read + packages: read + pages: read + pull-requests: read + repository-projects: read + security-events: read + statuses: read jobs: TagBot: if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot' @@ -12,4 +30,6 @@ jobs: - uses: JuliaRegistries/TagBot@v1 with: token: ${{ secrets.GITHUB_TOKEN }} + # Edit the following line to reflect the actual name of the GitHub Secret containing your private key ssh: ${{ secrets.DOCUMENTER_KEY }} + # ssh: ${{ secrets.NAME_OF_MY_SSH_PRIVATE_KEY_SECRET }} diff --git a/README.md b/README.md index ccfd2a9..424f2f2 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ [![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://micahjsmith.github.io/FredData.jl/dev) -[![Tests](https://github.com/micahjsmith/FredData.jl/actions/workflows/Tests.yml/badge.svg)](https://github.com/micahjsmith/FredData.jl/actions/workflows/Tests.yml) +[![Tests](https://github.com/micahjsmith/FredData.jl/actions/workflows/CI/badge.svg)](https://github.com/micahjsmith/FredData.jl/actions?query=workflow%3ACI) [![Coverage](https://codecov.io/gh/micahjsmith/FredData.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/micahjsmith/FredData.jl) [![version](https://juliahub.com/docs/FredData/version.svg)](https://juliahub.com/ui/Packages/FredData/SEoaS) [![pkgeval](https://juliahub.com/docs/FredData/pkgeval.svg)](https://juliahub.com/ui/Packages/FredData/SEoaS) diff --git a/docs/Project.toml b/docs/Project.toml index 42c78d0..e2935b2 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -1,3 +1,6 @@ [deps] Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" FredData = "6e85b7ee-7d24-5488-b1b7-e4f4198c51ac" + +[compat] +Documenter = "1"