Skip to content

Commit

Permalink
[CI] Some updates to GitHub Actions setup (#583)
Browse files Browse the repository at this point in the history
* Install dependabot
* Update various external workflows
* Use `julia-actions/setup-julia` instead of `actions/cache`
  • Loading branch information
giordano authored Dec 9, 2024
1 parent 22ad11e commit a659148
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 30 deletions.
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# 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:
interval: "weekly"
19 changes: 5 additions & 14 deletions .github/workflows/ci_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,12 @@ jobs:
name: Integration
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: '1'
arch: x64
- 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-
${{ runner.os }}-
- uses: julia-actions/cache@v2
- uses: julia-actions/julia-buildpkg@v1
- run: git config --global user.email "noreply@example.com"
- run: git config --global user.name "GitHub Actions"
Expand All @@ -58,7 +49,7 @@ jobs:
BCBI_TEST_USER_GITHUB_TOKEN: ${{ secrets.BCBI_TEST_USER_GITHUB_TOKEN }}
INTEGRATION_TEST_READ_ONLY_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v1
- uses: codecov/codecov-action@v5
with:
file: lcov.info
files: lcov.info
token: ${{ secrets.CODECOV_TOKEN }}
29 changes: 14 additions & 15 deletions .github/workflows/ci_unit.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
name: CI (unit tests)

on:
merge_group: # GitHub Merge Queue
pull_request:
push:
branches:
- master
tags: '*'

env:
JULIA_PKG_UNPACK_REGISTRY: 'true'

jobs:

unit:
name: Unit/Julia ${{ matrix.version }}/${{ matrix.os }}/${{ matrix.arch }}
runs-on: ${{ matrix.os }}
Expand All @@ -29,35 +33,28 @@ jobs:
- '1'
- '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-
${{ runner.os }}-
- uses: julia-actions/cache@v2
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
env:
AUTOMERGE_RUN_INTEGRATION_TESTS: "false"

documentation:
env:
JULIA_PKG_UNPACK_REGISTRY: 'false'
name: Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v1
with:
version: '1'
- uses: julia-actions/cache@v2
- run: |
julia --project=docs -e '
using Pkg
Expand All @@ -70,14 +67,16 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}

doctests:
name: Doctests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: '1'
- uses: julia-actions/cache@v2
- run: |
julia --project=docs -e '
using Pkg
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/format_pr.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
name: Code Formatting

on:
push:
branches:
- master
workflow_dispatch:

jobs:
format_pr:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
- uses: julia-actions/cache@v2
- name: Install the JuliaFormatter package
run: julia --color=yes -e 'using Pkg; Pkg.add(name = "JuliaFormatter", uuid = "98e50ef6-434e-11e9-1051-2b60c6c9e899")'
- name: Precompile dependencies
Expand Down

0 comments on commit a659148

Please sign in to comment.