Skip to content

Commit bf5592a

Browse files
committed
Merge branch 'main' into cran-1.0.2
2 parents fbc9195 + 35edb0b commit bf5592a

File tree

21 files changed

+666
-151
lines changed

21 files changed

+666
-151
lines changed

.github/dep-suggests-matrix.json

Whitespace-only changes.

.github/versions-matrix.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"include":[{"os":"macos-latest","r":"4.4"},{"os":"macos-latest","r":"4.3"},{"os":"windows-latest","r":"devel"},{"os":"windows-latest","r":"4.4"},{"os":"windows-latest","r":"4.3"},{"os":"ubuntu-22.04","r":"devel","http-user-agent":"release"},{"os":"ubuntu-22.04","r":"4.4"},{"os":"ubuntu-22.04","r":"4.3"},{"os":"ubuntu-22.04","r":"4.2"},{"os":"ubuntu-22.04","r":"4.1"},{"os":"ubuntu-22.04","r":"4.0"},{"os":"ubuntu-22.04","r":"4.4","covr":"true","desc":"with covr"}]}

.github/workflows/R-CMD-check-dev.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ name: rcc dev
1313

1414
jobs:
1515
matrix:
16-
runs-on: ubuntu-20.04
16+
runs-on: ubuntu-22.04
1717
outputs:
1818
matrix: ${{ steps.set-matrix.outputs.matrix }}
1919

2020
name: Collect deps
2121

2222
steps:
23-
- uses: actions/checkout@v3
23+
- uses: actions/checkout@v4
2424

2525
- uses: ./.github/workflows/rate-limit
2626
with:
@@ -63,7 +63,7 @@ jobs:
6363
fail-fast: false
6464

6565
steps:
66-
- uses: actions/checkout@v3
66+
- uses: actions/checkout@v4
6767

6868
- uses: ./.github/workflows/custom/before-install
6969
if: hashFiles('.github/workflows/custom/before-install/action.yml') != ''
@@ -101,7 +101,7 @@ jobs:
101101

102102
runs-on: ubuntu-22.04
103103

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

106106
# Begin custom: services
107107
# End custom: services
@@ -111,7 +111,7 @@ jobs:
111111
matrix: ${{fromJson(needs.matrix.outputs.matrix)}}
112112

113113
steps:
114-
- uses: actions/checkout@v3
114+
- uses: actions/checkout@v4
115115

116116
- uses: ./.github/workflows/custom/before-install
117117
if: hashFiles('.github/workflows/custom/before-install/action.yml') != ''
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# Workflow to update the status of a commit for the R-CMD-check workflow
2+
# Necessary because remote PRs cannot update the status of the commit
3+
on:
4+
workflow_run:
5+
workflows:
6+
- rcc
7+
types:
8+
- requested
9+
- completed
10+
11+
name: rcc-status
12+
13+
jobs:
14+
rcc-status:
15+
runs-on: ubuntu-latest
16+
17+
name: "Update commit status"
18+
19+
steps:
20+
- name: "Update commit status"
21+
# Only run if triggered by rcc workflow
22+
if: github.event.workflow_run.name == 'rcc'
23+
env:
24+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25+
run: |
26+
set -x
27+
28+
if [ "${{ github.event.workflow_run.status }}" == "completed" ]; then
29+
if [ "${{ github.event.workflow_run.conclusion }}" == "success" ]; then
30+
state="success"
31+
else
32+
state="failure"
33+
fi
34+
35+
# Read artifact ID
36+
artifact_id=$(gh api \
37+
-H "Accept: application/vnd.github+json" \
38+
-H "X-GitHub-Api-Version: 2022-11-28" \
39+
repos/${{ github.repository }}/actions/runs/${{ github.event.workflow_run.id }}/artifacts | jq -r '.artifacts[] | select(.name == "rcc-smoke-sha") | .id')
40+
41+
if [ -n "${artifact_id}" ]; then
42+
# Download artifact
43+
curl -L -o rcc-smoke-sha.zip \
44+
-H "Accept: application/vnd.github+json" \
45+
-H "Authorization: Bearer ${GH_TOKEN}" \
46+
-H "X-GitHub-Api-Version: 2022-11-28" \
47+
https://api.github.com/repos/${{ github.repository }}/actions/artifacts/${artifact_id}/zip
48+
49+
# Unzip artifact
50+
unzip rcc-smoke-sha.zip
51+
52+
# Read artifact
53+
sha=$(cat rcc-smoke-sha.txt)
54+
55+
# Clean up
56+
rm rcc-smoke-sha.zip rcc-smoke-sha.txt
57+
fi
58+
else
59+
state="pending"
60+
fi
61+
62+
if [ -z "${sha}" ]; then
63+
sha=${{ github.event.workflow_run.head_sha }}
64+
fi
65+
66+
html_url=${{ github.event.workflow_run.html_url }}
67+
description=${{ github.event.workflow_run.name }}
68+
69+
gh api \
70+
--method POST \
71+
-H "Accept: application/vnd.github+json" \
72+
-H "X-GitHub-Api-Version: 2022-11-28" \
73+
repos/${{ github.repository }}/statuses/${sha} \
74+
-f "state=${state}" -f "target_url=${html_url}" -f "description=${description}" -f "context=rcc"
75+
shell: bash

0 commit comments

Comments
 (0)