-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New data collected at 2024-12-23_00-02-02
- Loading branch information
1 parent
c3f13eb
commit 5f654e8
Showing
23 changed files
with
274 additions
and
117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples | ||
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help | ||
on: | ||
push: | ||
branches: [main, master] | ||
pull_request: | ||
|
||
name: R-CMD-check.yaml | ||
|
||
permissions: read-all | ||
|
||
jobs: | ||
R-CMD-check: | ||
runs-on: ${{ matrix.config.os }} | ||
|
||
name: ${{ matrix.config.os }} (${{ matrix.config.r }}) | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
config: | ||
- {os: macos-latest, r: 'release'} | ||
- {os: windows-latest, r: 'release'} | ||
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'} | ||
- {os: ubuntu-latest, r: 'release'} | ||
- {os: ubuntu-latest, r: 'oldrel-1'} | ||
|
||
env: | ||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
R_KEEP_PKG_SOURCE: yes | ||
# prevent rgl issues because no X11 display is available | ||
RGL_USE_NULL: true | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: r-lib/actions/setup-pandoc@v2 | ||
|
||
- uses: r-lib/actions/setup-r@v2 | ||
with: | ||
r-version: ${{ matrix.config.r }} | ||
http-user-agent: ${{ matrix.config.http-user-agent }} | ||
use-public-rspm: true | ||
|
||
- uses: r-lib/actions/setup-r-dependencies@v2 | ||
with: | ||
extra-packages: any::rcmdcheck | ||
needs: check | ||
|
||
- uses: r-lib/actions/check-r-package@v2 | ||
with: | ||
upload-snapshots: true | ||
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples | ||
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help | ||
on: | ||
push: | ||
branches: [main, master] | ||
pull_request: | ||
release: | ||
types: [published] | ||
workflow_dispatch: | ||
|
||
name: pkgdown.yaml | ||
|
||
permissions: read-all | ||
|
||
jobs: | ||
pkgdown: | ||
runs-on: ubuntu-latest | ||
# Only restrict concurrency for non-PR jobs | ||
concurrency: | ||
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }} | ||
env: | ||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
permissions: | ||
contents: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: r-lib/actions/setup-pandoc@v2 | ||
|
||
- uses: r-lib/actions/setup-r@v2 | ||
with: | ||
use-public-rspm: true | ||
|
||
- uses: r-lib/actions/setup-r-dependencies@v2 | ||
with: | ||
extra-packages: any::pkgdown, local::. | ||
needs: website | ||
|
||
- name: Build site | ||
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE) | ||
shell: Rscript {0} | ||
|
||
- name: Deploy to GitHub pages 🚀 | ||
if: github.event_name != 'pull_request' | ||
uses: JamesIves/[email protected] | ||
with: | ||
clean: false | ||
branch: gh-pages | ||
folder: docs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples | ||
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help | ||
on: | ||
push: | ||
branches: [main, master] | ||
pull_request: | ||
|
||
name: test-coverage.yaml | ||
|
||
permissions: read-all | ||
|
||
jobs: | ||
test-coverage: | ||
runs-on: ubuntu-latest | ||
env: | ||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: r-lib/actions/setup-r@v2 | ||
with: | ||
use-public-rspm: true | ||
|
||
- uses: r-lib/actions/setup-r-dependencies@v2 | ||
with: | ||
extra-packages: any::covr, any::xml2 | ||
needs: coverage | ||
|
||
- name: Test coverage | ||
run: | | ||
cov <- covr::package_coverage( | ||
quiet = FALSE, | ||
clean = FALSE, | ||
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package") | ||
) | ||
covr::to_cobertura(cov) | ||
shell: Rscript {0} | ||
|
||
- uses: codecov/codecov-action@v4 | ||
with: | ||
# Fail if error if not on PR, or if on PR and token is given | ||
fail_ci_if_error: ${{ github.event_name != 'pull_request' || secrets.CODECOV_TOKEN }} | ||
file: ./cobertura.xml | ||
plugin: noop | ||
disable_search: true | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
|
||
- name: Show testthat output | ||
if: always() | ||
run: | | ||
## -------------------------------------------------------------------- | ||
find '${{ runner.temp }}/package' -name 'testthat.Rout*' -exec cat '{}' \; || true | ||
shell: bash | ||
|
||
- name: Upload test results | ||
if: failure() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: coverage-test-failures | ||
path: ${{ runner.temp }}/package |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -157,22 +157,37 @@ jobs: | |
needs: [check-comment, format] | ||
if: ${{ needs.format.outputs.reformatted == 'true' }} | ||
permissions: {} | ||
outputs: | ||
head_sha: ${{ steps.push.outputs.head_sha }} | ||
steps: | ||
- uses: actions/create-github-app-token@v1 | ||
id: app-token | ||
with: | ||
app-id: ${{ secrets.APP_ID }} | ||
# See https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/managing-private-keys-for-github-apps | ||
# for how to rotate the private key | ||
private-key: ${{ secrets.APP_PRIVATE_KEY }} | ||
- uses: actions/checkout@v4 | ||
with: | ||
repository: ${{ needs.check-comment.outputs.repository }} | ||
ref: ${{ needs.check-comment.outputs.head_ref }} | ||
# Set fetch-depth to merge the base branch | ||
fetch-depth: 300 | ||
token: ${{ secrets.MLFLOW_AUTOMATION_TOKEN }} | ||
# As reported in https://github.com/orgs/community/discussions/25702, if an action pushes | ||
# code using `GITHUB_TOKEN`, that won't trigger new workflow runs on the PR. | ||
# A personal access token is required to trigger new workflow runs. | ||
token: ${{ steps.app-token.outputs.token }} | ||
|
||
- name: Merge base branch | ||
env: | ||
BASE_REPO: ${{ needs.check-comment.outputs.base_repo }} | ||
BASE_REF: ${{ needs.check-comment.outputs.base_ref }} | ||
run: | | ||
git config user.name 'mlflow-automation' | ||
git config user.email '[email protected]' | ||
git remote add base https://github.com/${{ needs.check-comment.outputs.base_repo }}.git | ||
git fetch base ${{ needs.check-comment.outputs.base_ref }} | ||
git merge base/${{ needs.check-comment.outputs.base_ref }} | ||
git remote add base https://github.com/${BASE_REPO}.git | ||
git fetch base $BASE_REF | ||
git merge base/${BASE_REF} | ||
- name: Download patch | ||
uses: actions/download-artifact@v4 | ||
|
@@ -181,9 +196,14 @@ jobs: | |
path: /tmp | ||
|
||
- name: Apply patch and push | ||
id: push | ||
env: | ||
RUN_ID: ${{ github.run_id }} | ||
REPOSITORY: ${{ github.repository }} | ||
run: | | ||
git apply /tmp/${{ github.run_id }}.diff | ||
git commit -sam "Autoformat: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" | ||
git apply /tmp/${RUN_ID}.diff | ||
git commit -sam "Autoformat: https://github.com/${REPOSITORY}/actions/runs/${RUN_ID}" | ||
echo "head_sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT | ||
git push | ||
update-status: | ||
|
@@ -192,7 +212,8 @@ jobs: | |
needs: [check-comment, format, push] | ||
if: always() && needs.check-comment.outputs.should_autoformat == 'true' | ||
permissions: | ||
statuses: write # autoformat.updateStatus | ||
statuses: write # To update check statuses | ||
actions: write # To approve workflow runs | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
|
@@ -205,4 +226,13 @@ jobs: | |
const needs = ${{ toJson(needs) }}; | ||
const head_sha = '${{ needs.check-comment.outputs.head_sha }}' | ||
const autoformat = require('./.github/workflows/autoformat.js'); | ||
// TODO: Remove try-catch block once we are confident that the code works fine. | ||
try { | ||
const push_head_sha = '${{ needs.push.outputs.head_sha }}'; | ||
if (push_head_sha) { | ||
await autoformat.approveWorkflowRuns(context, github, push_head_sha); | ||
} | ||
} catch (error) { | ||
core.warning(`Failed to approve workflow runs: ${error}`); | ||
} | ||
await autoformat.updateStatus(context, github, head_sha, needs); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ on: | |
jobs: | ||
check: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
permissions: | ||
pull-requests: read | ||
steps: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.