Skip to content

Commit

Permalink
Merge branch 'main' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
krlmlr authored Dec 15, 2024
2 parents 8a54380 + e965800 commit c1dddd0
Show file tree
Hide file tree
Showing 104 changed files with 1,750 additions and 11,070 deletions.
2 changes: 2 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,5 @@ _cache$
^\.vscode$
^vignettes/.*\.html$
^CRAN-SUBMISSION$
^\.aviator/config\.yml$
^index\.md$
43 changes: 43 additions & 0 deletions .aviator/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
merge_rules:
labels:
trigger: mergequeue
skip_line: mergequeue-priority
merge_failed: blocked
skip_delete_branch: ''
update_latest: true
delete_branch: false
use_rebase: true
publish_status_check: ready
status_comment:
publish: always
open_message: ''
queued_message: ''
blocked_message: ''
enable_comments: true
ci_timeout_mins: 0
require_all_checks_pass: true
require_skip_line_reason: false
preconditions:
validations: []
number_of_approvals: 0
required_checks: []
use_github_mergeability: true
conversation_resolution_required: false
merge_mode:
type: default
auto_update:
enabled: true
label: 'mergequeue'
max_runs_for_update: 0
merge_commit:
use_title_and_body: false
merge_strategy:
name: merge
override_labels:
squash: ''
merge: ''
rebase: ''
base_branches:
- main
scenarios: []
version: 1.1.0
14 changes: 5 additions & 9 deletions .github/workflows/R-CMD-check-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,20 @@ name: rcc dev

jobs:
matrix:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}

name: Collect deps

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: ./.github/workflows/rate-limit
with:
token: ${{ secrets.GITHUB_TOKEN }}

- uses: r-lib/actions/setup-r@v2
with:
install-r: false

- id: set-matrix
uses: ./.github/workflows/dep-matrix
Expand Down Expand Up @@ -63,14 +61,13 @@ jobs:
fail-fast: false

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: ./.github/workflows/custom/before-install
if: hashFiles('.github/workflows/custom/before-install/action.yml') != ''

- uses: ./.github/workflows/install
with:
install-r: false
cache-version: rcc-dev-base-1
needs: check
extra-packages: "any::rcmdcheck any::remotes ."
Expand Down Expand Up @@ -101,7 +98,7 @@ jobs:

runs-on: ubuntu-22.04

name: ${{ matrix.package }}
name: 'rcc-dev: ${{ matrix.package }}'

# Begin custom: services
# End custom: services
Expand All @@ -111,14 +108,13 @@ jobs:
matrix: ${{fromJson(needs.matrix.outputs.matrix)}}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: ./.github/workflows/custom/before-install
if: hashFiles('.github/workflows/custom/before-install/action.yml') != ''

- uses: ./.github/workflows/install
with:
install-r: false
cache-version: rcc-dev-${{ matrix.package }}-1
needs: check
extra-packages: "any::rcmdcheck any::remotes ."
Expand Down
75 changes: 75 additions & 0 deletions .github/workflows/R-CMD-check-status.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# Workflow to update the status of a commit for the R-CMD-check workflow
# Necessary because remote PRs cannot update the status of the commit
on:
workflow_run:
workflows:
- rcc
types:
- requested
- completed

name: rcc-status

jobs:
rcc-status:
runs-on: ubuntu-24.04

name: "Update commit status"

steps:
- name: "Update commit status"
# Only run if triggered by rcc workflow
if: github.event.workflow_run.name == 'rcc'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -x
if [ "${{ github.event.workflow_run.status }}" == "completed" ]; then
if [ "${{ github.event.workflow_run.conclusion }}" == "success" ]; then
state="success"
else
state="failure"
fi
# Read artifact ID
artifact_id=$(gh api \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
repos/${{ github.repository }}/actions/runs/${{ github.event.workflow_run.id }}/artifacts | jq -r '.artifacts[] | select(.name == "rcc-smoke-sha") | .id')
if [ -n "${artifact_id}" ]; then
# Download artifact
curl -L -o rcc-smoke-sha.zip \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${GH_TOKEN}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/${{ github.repository }}/actions/artifacts/${artifact_id}/zip
# Unzip artifact
unzip rcc-smoke-sha.zip
# Read artifact
sha=$(cat rcc-smoke-sha.txt)
# Clean up
rm rcc-smoke-sha.zip rcc-smoke-sha.txt
fi
else
state="pending"
fi
if [ -z "${sha}" ]; then
sha=${{ github.event.workflow_run.head_sha }}
fi
html_url=${{ github.event.workflow_run.html_url }}
description=${{ github.event.workflow_run.name }}
gh api \
--method POST \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
repos/${{ github.repository }}/statuses/${sha} \
-f "state=${state}" -f "target_url=${html_url}" -f "description=${description}" -f "context=rcc"
shell: bash
Loading

0 comments on commit c1dddd0

Please sign in to comment.