From e4b4fcda083dd0afe55afcd7dd095aceaa0fb121 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kirill=20M=C3=BCller?= Date: Sat, 9 Nov 2024 06:09:00 +0100 Subject: [PATCH 1/9] ci: Latest changes --- .github/workflows/R-CMD-check.yaml | 6 +++++- .github/workflows/fledge.yaml | 2 +- .github/workflows/install/action.yml | 3 +++ .github/workflows/pkgdown.yaml | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index 56ae58c6..2af0024c 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -106,7 +106,7 @@ jobs: cache-version: rcc-smoke-2 needs: check, website # Beware of using dev pkgdown here, has brought in dev dependencies in the past - extra-packages: any::rcmdcheck r-lib/roxygen2 any::decor r-lib/styler r-lib/pkgdown@f-readme-tweak deps::. + extra-packages: any::rcmdcheck r-lib/roxygen2 any::decor r-lib/styler r-lib/pkgdown deps::. - name: Install package run: | @@ -267,6 +267,8 @@ jobs: with: results: ${{ runner.os }}-r${{ matrix.r }} +# The status update is taken care of by R-CMD-check-status.yaml + rcc-suggests: needs: - rcc-smoke @@ -340,3 +342,5 @@ jobs: - uses: ./.github/workflows/check with: results: ${{ matrix.package }} + +# The status update is taken care of by R-CMD-check-status.yaml diff --git a/.github/workflows/fledge.yaml b/.github/workflows/fledge.yaml index d880c55d..02e9101f 100644 --- a/.github/workflows/fledge.yaml +++ b/.github/workflows/fledge.yaml @@ -43,7 +43,7 @@ jobs: env: FLEDGE_GHA_CI: true steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: fetch-depth: 0 diff --git a/.github/workflows/install/action.yml b/.github/workflows/install/action.yml index 702aedab..263ddf3a 100644 --- a/.github/workflows/install/action.yml +++ b/.github/workflows/install/action.yml @@ -56,6 +56,9 @@ runs: echo "_R_CHECK_UNDOC_USE_ALL_NAMES_=true" | tee -a $GITHUB_ENV echo "_R_CHECK_URLS_SHOW_301_STATUS_=true" | tee -a $GITHUB_ENV echo "_R_CXX_USE_NO_REMAP_=true" | tee -a $GITHUB_ENV + # There is no way to disable recency and frequency checks when the incoming checks are run + # echo "_R_CHECK_CRAN_INCOMING_=true" | tee -a $GITHUB_ENV + echo "_R_CHECK_CRAN_INCOMING_SKIP_LARGE_VERSION_=true" | tee -a $GITHUB_ENV shell: bash - name: Set environment variables (non-Windows only) diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml index 6afddb16..de69b149 100644 --- a/.github/workflows/pkgdown.yaml +++ b/.github/workflows/pkgdown.yaml @@ -42,7 +42,7 @@ jobs: install-r: false cache-version: pkgdown-2 needs: website - extra-packages: r-lib/pkgdown@f-readme-tweak local::. + extra-packages: r-lib/pkgdown local::. - uses: ./.github/workflows/custom/after-install if: hashFiles('.github/workflows/custom/after-install/action.yml') != '' From 38dd76cb6ec29818253dda0e93a14e4af8c5b357 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kirill=20M=C3=BCller?= Date: Sat, 16 Nov 2024 19:02:39 +0100 Subject: [PATCH 2/9] ci: Use stable pak --- .github/workflows/install/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/install/action.yml b/.github/workflows/install/action.yml index 263ddf3a..bb42f186 100644 --- a/.github/workflows/install/action.yml +++ b/.github/workflows/install/action.yml @@ -95,7 +95,7 @@ runs: env: GITHUB_PAT: ${{ inputs.token }} with: - pak-version: devel + pak-version: stable needs: ${{ inputs.needs }} packages: ${{ inputs.packages }} extra-packages: ${{ inputs.extra-packages }} ${{ ( matrix.config.covr && 'any::covr' ) || '' }} ${{ steps.get-extra.outputs.packages }} From fdbdf5878acb5e4832453f2f6b68f453cc372362 Mon Sep 17 00:00:00 2001 From: krlmlr Date: Sun, 17 Nov 2024 06:13:35 +0000 Subject: [PATCH 3/9] chore: Auto-update from GitHub Actions Run: https://github.com/poissonconsulting/chk/actions/runs/11876513601 --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index a7e0197a..6e71886a 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -44,4 +44,4 @@ Config/testthat/edition: 3 Encoding: UTF-8 Language: en-US Roxygen: list(markdown = TRUE) -RoxygenNote: 7.3.2 +RoxygenNote: 7.3.2.9000 From f9d56c9e7eb0af9114510531f37da765329a80d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kirill=20M=C3=BCller?= Date: Fri, 22 Nov 2024 14:46:19 +0100 Subject: [PATCH 4/9] ci: Correctly detect branch protection (#148) --- .github/workflows/fledge.yaml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/fledge.yaml b/.github/workflows/fledge.yaml index 02e9101f..b197fb35 100644 --- a/.github/workflows/fledge.yaml +++ b/.github/workflows/fledge.yaml @@ -72,8 +72,18 @@ jobs: packages: cynkra/fledge cache-version: fledge-1 + - name: Count rulesets + # Assume that branch is protected if ruleset exists + id: rulesets + env: + GH_TOKEN: ${{ github.token }} + run: | + n_rulesets=$(gh api repos/${{ github.repository }}/rulesets -q length) + echo "count=${n_rulesets}" >> $GITHUB_OUTPUT + shell: bash + - name: Switch to branch if branch protection is enabled - if: github.ref_protected == 'true' || inputs.pr == 'true' + if: github.ref_protected == 'true' || inputs.pr == 'true' || steps.rulesets.outputs.count > 0 run: | git checkout -b fledge git push -f -u origin HEAD @@ -83,14 +93,14 @@ jobs: env: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} run: | - check_default_branch <- ("${{ github.ref_protected == 'true' || inputs.pr == 'true' }}" != "true") + check_default_branch <- ("${{ github.ref_protected == 'true' || inputs.pr == 'true' || steps.rulesets.outputs.count > 0 }}" != "true") if (fledge::bump_version(which = "dev", no_change_behavior = "noop", check_default_branch = check_default_branch)) { fledge::finalize_version(push = TRUE) } shell: Rscript {0} - name: Create and merge PR if branch protection is enabled - if: github.ref_protected == 'true' || inputs.pr == 'true' + if: github.ref_protected == 'true' || inputs.pr == 'true' || steps.rulesets.outputs.count > 0 env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | From 9e6fd150d1502ba5e05961f1808a4462f1a70c33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kirill=20M=C3=BCller?= Date: Tue, 26 Nov 2024 10:44:09 +0100 Subject: [PATCH 5/9] ci: Use Ubuntu 24.04 and styler PR (#149) * ci: Use Ubuntu 24.04 and styler PR * ci: Use Ubuntu 24.04 for fledge, squash * ci: Fix macOS (#16) * ci: Need to install R on Ubuntu 24.04 * ci: Need to install R on Ubuntu 24.04 for fledge * ci: Use styler from main branch --- .github/workflows/R-CMD-check-dev.yaml | 4 ---- .github/workflows/R-CMD-check-status.yaml | 2 +- .github/workflows/R-CMD-check.yaml | 5 ++--- .github/workflows/fledge.yaml | 7 +++---- .github/workflows/install/action.yml | 6 ++++++ .github/workflows/lock.yaml | 2 +- .github/workflows/pkgdown.yaml | 3 +-- .github/workflows/pr-commands.yaml | 4 ---- 8 files changed, 14 insertions(+), 19 deletions(-) diff --git a/.github/workflows/R-CMD-check-dev.yaml b/.github/workflows/R-CMD-check-dev.yaml index 700486fc..bb87451a 100644 --- a/.github/workflows/R-CMD-check-dev.yaml +++ b/.github/workflows/R-CMD-check-dev.yaml @@ -27,8 +27,6 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} - uses: r-lib/actions/setup-r@v2 - with: - install-r: false - id: set-matrix uses: ./.github/workflows/dep-matrix @@ -70,7 +68,6 @@ jobs: - uses: ./.github/workflows/install with: - install-r: false cache-version: rcc-dev-base-1 needs: check extra-packages: "any::rcmdcheck any::remotes ." @@ -118,7 +115,6 @@ jobs: - uses: ./.github/workflows/install with: - install-r: false cache-version: rcc-dev-${{ matrix.package }}-1 needs: check extra-packages: "any::rcmdcheck any::remotes ." diff --git a/.github/workflows/R-CMD-check-status.yaml b/.github/workflows/R-CMD-check-status.yaml index b9bdf4e4..7a4ea62f 100644 --- a/.github/workflows/R-CMD-check-status.yaml +++ b/.github/workflows/R-CMD-check-status.yaml @@ -12,7 +12,7 @@ name: rcc-status jobs: rcc-status: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 name: "Update commit status" diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index 2af0024c..41ae8a5b 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -43,7 +43,7 @@ name: rcc jobs: rcc-smoke: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 outputs: sha: ${{ steps.commit.outputs.sha }} versions-matrix: ${{ steps.versions-matrix.outputs.matrix }} @@ -205,7 +205,7 @@ jobs: shell: bash rcc-smoke-check-matrix: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 name: "Check matrix" @@ -294,7 +294,6 @@ jobs: - uses: ./.github/workflows/install with: - install-r: false cache-version: rcc-dev-${{ matrix.package }}-1 needs: check extra-packages: "any::rcmdcheck any::remotes ." diff --git a/.github/workflows/fledge.yaml b/.github/workflows/fledge.yaml index b197fb35..7785ad93 100644 --- a/.github/workflows/fledge.yaml +++ b/.github/workflows/fledge.yaml @@ -19,7 +19,7 @@ concurrency: jobs: check_fork: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 outputs: is_forked: ${{ steps.check.outputs.is_forked }} steps: @@ -33,7 +33,7 @@ jobs: shell: bash fledge: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 needs: check_fork if: needs.check_fork.outputs.is_forked == 'false' permissions: @@ -61,7 +61,6 @@ jobs: - uses: r-lib/actions/setup-r@v2 with: - install-r: false use-public-rspm: true - uses: r-lib/actions/setup-r-dependencies@v2 @@ -107,7 +106,7 @@ jobs: set -x gh pr create --base main --head fledge --fill-first gh workflow run rcc -f ref=$(git rev-parse HEAD) - gh pr merge --merge --auto + gh pr merge --squash --auto shell: bash - name: Check release diff --git a/.github/workflows/install/action.yml b/.github/workflows/install/action.yml index bb42f186..59673d9c 100644 --- a/.github/workflows/install/action.yml +++ b/.github/workflows/install/action.yml @@ -75,6 +75,12 @@ runs: echo "_R_CHECK_CRAN_INCOMING_USE_ASPELL_=true" | tee -a $GITHUB_ENV shell: bash + - name: Remove pkg-config@0.29.2 + if: runner.os == 'macOS' + run: | + brew uninstall pkg-config@0.29.2 + shell: bash + - uses: r-lib/actions/setup-pandoc@v2 - uses: r-lib/actions/setup-r@v2 diff --git a/.github/workflows/lock.yaml b/.github/workflows/lock.yaml index e2a367f8..dd05bc31 100644 --- a/.github/workflows/lock.yaml +++ b/.github/workflows/lock.yaml @@ -6,7 +6,7 @@ on: jobs: lock: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - uses: dessant/lock-threads@v5 with: diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml index de69b149..60d18490 100644 --- a/.github/workflows/pkgdown.yaml +++ b/.github/workflows/pkgdown.yaml @@ -16,7 +16,7 @@ concurrency: jobs: pkgdown: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 name: "pkgdown" @@ -39,7 +39,6 @@ jobs: - uses: ./.github/workflows/install with: token: ${{ secrets.GITHUB_TOKEN }} - install-r: false cache-version: pkgdown-2 needs: website extra-packages: r-lib/pkgdown local::. diff --git a/.github/workflows/pr-commands.yaml b/.github/workflows/pr-commands.yaml index a11f4d39..b07a6f3a 100644 --- a/.github/workflows/pr-commands.yaml +++ b/.github/workflows/pr-commands.yaml @@ -16,8 +16,6 @@ jobs: with: repo-token: ${{ secrets.GITHUB_TOKEN }} - uses: r-lib/actions/setup-r@v2 - with: - install-r: false - name: Configure Git identity run: | env | sort @@ -55,8 +53,6 @@ jobs: with: repo-token: ${{ secrets.GITHUB_TOKEN }} - uses: r-lib/actions/setup-r@v2 - with: - install-r: false - name: Configure Git identity run: | env | sort From ea37912a58d8acbd9c378b80e038d2764813f51f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kirill=20M=C3=BCller?= Date: Tue, 26 Nov 2024 20:36:14 +0100 Subject: [PATCH 6/9] ci: Use Ubuntu 24.04 and styler PR (#150) * ci: Use Ubuntu 24.04 and styler PR * ci: Use styler from main branch * ci: Explicit permissions --- .github/workflows/lock.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/lock.yaml b/.github/workflows/lock.yaml index dd05bc31..6c52f683 100644 --- a/.github/workflows/lock.yaml +++ b/.github/workflows/lock.yaml @@ -1,6 +1,10 @@ name: "Lock threads" - +permissions: + issues: write + pull-requests: write + discussions: write on: + workflow_dispatch: schedule: - cron: "37 2 * * *" From 5cd0ee0f1105101e38a6fa636824f5eb451e2e4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kirill=20M=C3=BCller?= Date: Wed, 27 Nov 2024 15:34:41 +0100 Subject: [PATCH 7/9] ci: Ignore errors when removing pkg-config on macOS (#151) --- .github/workflows/install/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/install/action.yml b/.github/workflows/install/action.yml index 59673d9c..03bcb1eb 100644 --- a/.github/workflows/install/action.yml +++ b/.github/workflows/install/action.yml @@ -78,7 +78,7 @@ runs: - name: Remove pkg-config@0.29.2 if: runner.os == 'macOS' run: | - brew uninstall pkg-config@0.29.2 + brew uninstall pkg-config@0.29.2 || true shell: bash - uses: r-lib/actions/setup-pandoc@v2 From 9eaeefee22fe920099289a8b925a6a26a4528a3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kirill=20M=C3=BCller?= Date: Fri, 6 Dec 2024 16:48:27 +0100 Subject: [PATCH 8/9] ci: Use larger retry count for lock-threads workflow (#152) --- .github/workflows/lock.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lock.yaml b/.github/workflows/lock.yaml index 6c52f683..2cd48378 100644 --- a/.github/workflows/lock.yaml +++ b/.github/workflows/lock.yaml @@ -12,7 +12,7 @@ jobs: lock: runs-on: ubuntu-24.04 steps: - - uses: dessant/lock-threads@v5 + - uses: krlmlr/lock-threads@patch-1 with: github-token: ${{ github.token }} issue-inactive-days: "365" From 4de01753daf148335d99eac504511d747ce120bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kirill=20M=C3=BCller?= Date: Sun, 8 Dec 2024 18:25:35 +0100 Subject: [PATCH 9/9] ci: Fetch tags for fledge workflow to avoid unnecessary NEWS entries (#153) * ci: Fetch tags for fledge workflow to avoid unnecessary NEWS entries * ci: Avoid failure in fledge workflow if no changes --- .github/workflows/fledge.yaml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/fledge.yaml b/.github/workflows/fledge.yaml index 7785ad93..5b2131ae 100644 --- a/.github/workflows/fledge.yaml +++ b/.github/workflows/fledge.yaml @@ -46,6 +46,7 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 + fetch-tags: true - name: Configure Git identity run: | @@ -103,10 +104,14 @@ jobs: env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - set -x - gh pr create --base main --head fledge --fill-first - gh workflow run rcc -f ref=$(git rev-parse HEAD) - gh pr merge --squash --auto + set -ex + if [ -n "$(git diff main --numstat)" ]; then + gh pr create --base main --head fledge --fill-first + gh workflow run rcc -f ref=$(git rev-parse HEAD) + gh pr merge --squash --auto + else + echo "No changes." + fi shell: bash - name: Check release