From 489f12ea3312fb5db939783642e0d8a889b8f3b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20G=C3=B6ttgens?= Date: Thu, 22 Feb 2024 12:21:50 +0100 Subject: [PATCH] Update some CI actions (#150) --- .codecov.yml | 2 -- .github/workflows/Documentation.yml | 2 +- .github/workflows/OscarTests.yml | 12 +++++++++--- .github/workflows/Tests.yml | 12 +++++++++--- 4 files changed, 19 insertions(+), 9 deletions(-) diff --git a/.codecov.yml b/.codecov.yml index dc0fcef8..e3ae2ccf 100644 --- a/.codecov.yml +++ b/.codecov.yml @@ -9,5 +9,3 @@ coverage: changes: default: informational: true - -comment: false diff --git a/.github/workflows/Documentation.yml b/.github/workflows/Documentation.yml index 57cfcae8..affc6b44 100644 --- a/.github/workflows/Documentation.yml +++ b/.github/workflows/Documentation.yml @@ -19,7 +19,7 @@ jobs: deploy_docs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: "Set up Julia" uses: julia-actions/setup-julia@latest diff --git a/.github/workflows/OscarTests.yml b/.github/workflows/OscarTests.yml index 8695982f..a5a3edea 100644 --- a/.github/workflows/OscarTests.yml +++ b/.github/workflows/OscarTests.yml @@ -7,6 +7,11 @@ on: pull_request: workflow_dispatch: +# needed to allow julia-actions/cache to delete old caches that it has created +permissions: + actions: write + contents: read + concurrency: # group by workflow and ref; the last slightly strange component ensures that for pull # requests, we limit to 1 concurrent job, but for the master branch we don't @@ -43,7 +48,7 @@ jobs: # os: macOS-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: # For Codecov, we must also fetch the parent of the HEAD commit to # be able to properly deal with PRs / merges @@ -58,7 +63,8 @@ jobs: - name: Restore cache uses: julia-actions/cache@v1 with: - cache-name: 'oscartest-${{ matrix.julia-version }}-${{ matrix.os }}-${{ matrix.julia-arch }}' + cache-name: julia-cache;workflow=${{ github.workflow }};julia=${{ matrix.julia-version }};arch=${{ runner.arch }} + include-matrix: false - name: "Dev Oscar.jl master" shell: julia --project=. --color=yes {0} @@ -84,6 +90,6 @@ jobs: - name: "Upload coverage data to Codecov" continue-on-error: true - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/Tests.yml b/.github/workflows/Tests.yml index 5e6145c2..94db1bed 100644 --- a/.github/workflows/Tests.yml +++ b/.github/workflows/Tests.yml @@ -7,6 +7,11 @@ on: pull_request: workflow_dispatch: +# needed to allow julia-actions/cache to delete old caches that it has created +permissions: + actions: write + contents: read + concurrency: # group by workflow and ref; the last slightly strange component ensures that for pull # requests, we limit to 1 concurrent job, but for the master branch we don't @@ -43,7 +48,7 @@ jobs: # os: macOS-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: # For Codecov, we must also fetch the parent of the HEAD commit to # be able to properly deal with PRs / merges @@ -58,7 +63,8 @@ jobs: - name: Restore cache uses: julia-actions/cache@v1 with: - cache-name: 'test-${{ matrix.julia-version }}-${{ matrix.os }}-${{ matrix.julia-arch }}' + cache-name: julia-cache;workflow=${{ github.workflow }};julia=${{ matrix.julia-version }};arch=${{ runner.arch }} + include-matrix: false - name: "Build package" uses: julia-actions/julia-buildpkg@latest @@ -76,6 +82,6 @@ jobs: - name: "Upload coverage data to Codecov" continue-on-error: true - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }}