From f303d4d5b270180a7c901cdaba8082accdb158d1 Mon Sep 17 00:00:00 2001 From: adrhill Date: Mon, 7 Oct 2024 14:27:08 +0200 Subject: [PATCH] Update CI workflows --- .github/workflows/CompatHelper.yml | 4 +- .github/workflows/ci.yml | 83 ++++++++++++++++-------------- 2 files changed, 47 insertions(+), 40 deletions(-) diff --git a/.github/workflows/CompatHelper.yml b/.github/workflows/CompatHelper.yml index cba9134c..096f0cb5 100644 --- a/.github/workflows/CompatHelper.yml +++ b/.github/workflows/CompatHelper.yml @@ -1,11 +1,13 @@ name: CompatHelper on: schedule: - - cron: 0 0 * * * + - cron: '0 0 * * *' # Every day at midnight workflow_dispatch: jobs: CompatHelper: runs-on: ubuntu-latest + permissions: + contents: write steps: - name: Pkg.add("CompatHelper") run: julia -e 'using Pkg; Pkg.add("CompatHelper")' diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c79022d1..a50bb307 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,71 +1,76 @@ name: CI on: - pull_request: - branches: - - master push: branches: - master - tags: '*' + tags: ['*'] + pull_request: + workflow_dispatch: + jobs: + test: - name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} - runs-on: ${{ matrix.os }} + name: Julia ${{ matrix.version }} + runs-on: ubuntu-latest + timeout-minutes: 60 + 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' + - 'lts' - '1' - - 'nightly' - os: - - ubuntu-latest - arch: - - x64 + - 'pre' steps: - uses: actions/checkout@v4 - - uses: julia-actions/setup-julia@v1 + - 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 }}- + arch: x64 + - uses: julia-actions/cache@v2 - uses: julia-actions/julia-buildpkg@v1 - continue-on-error: ${{ matrix.version == 'nightly' }} - uses: julia-actions/julia-runtest@v1 - continue-on-error: ${{ matrix.version == 'nightly' }} - uses: julia-actions/julia-processcoverage@v1 + with: + directories: src,ext,test,benchmark - uses: codecov/codecov-action@v4 with: - file: lcov.info + files: lcov.info + token: ${{ secrets.CODECOV_TOKEN }} + slug: Julia-XAI/ExplainableAI.jl + docs: name: Documentation runs-on: ubuntu-latest + permissions: + actions: write # needed to allow julia-actions/cache to proactively delete old caches that it has created + contents: write + statuses: write steps: - uses: actions/checkout@v4 - - uses: julia-actions/setup-julia@v1 + - uses: julia-actions/setup-julia@v2 with: version: '1' - - run: | - julia --project=docs -e ' - using Pkg - Pkg.develop(PackageSpec(path=pwd())) - Pkg.instantiate()' - - run: | - julia --project=docs -e ' - using Documenter: doctest - using ExplainableAI - doctest(ExplainableAI)' - - run: julia --project=docs docs/make.jl + - uses: julia-actions/cache@v2 + - name: Configure doc environment + shell: julia --project=docs --color=yes {0} + run: | + using Pkg + Pkg.Registry.update() + Pkg.develop(PackageSpec(path=pwd())) + Pkg.instantiate() + + - uses: julia-actions/julia-buildpkg@v1 + - uses: julia-actions/julia-docdeploy@v1 env: DATADEPS_ALWAYS_ACCEPT: true # for MLDatasets download GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} + - name: Run doctests + run: | + julia --project=docs --color=yes -e ' + using Documenter: doctest + using ExplainableAI + doctest(ExplainableAI)'