Skip to content

Commit

Permalink
New data collected at 2024-12-23_00-02-02
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Dec 23, 2024
1 parent c3f13eb commit 5f654e8
Show file tree
Hide file tree
Showing 23 changed files with 274 additions and 117 deletions.
53 changes: 53 additions & 0 deletions github-actions/mapview/R-CMD-check.yaml
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")'
49 changes: 49 additions & 0 deletions github-actions/mapview/pkgdown.yaml
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
61 changes: 61 additions & 0 deletions github-actions/mapview/test-coverage.yaml
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
2 changes: 1 addition & 1 deletion github-actions/mlflow/advice.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ jobs:
const script = require(
`${process.env.GITHUB_WORKSPACE}/.github/workflows/advice.js`
);
script({ context, github });
await script({ context, github });
44 changes: 37 additions & 7 deletions github-actions/mlflow/autoformat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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);
2 changes: 1 addition & 1 deletion github-actions/mlflow/closing-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ jobs:
const script = require(
`${process.env.GITHUB_WORKSPACE}/.github/workflows/closing-pr.js`
);
script({ context, github });
await script({ context, github });
1 change: 1 addition & 0 deletions github-actions/mlflow/devcontainer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ jobs:
runs-on: ubuntu-latest
needs: devcontainer
if: github.event_name == 'push'
timeout-minutes: 60
permissions:
packages: write # to push to ghcr.io
steps:
Expand Down
1 change: 1 addition & 0 deletions github-actions/mlflow/js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
js:
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
permissions: {}
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
Expand Down
16 changes: 9 additions & 7 deletions github-actions/mlflow/labeling.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,16 @@ jobs:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
permissions:
pull-requests: write # harupy/auto-labeling
issues: write # harupy/auto-labeling
timeout-minutes: 120
pull-requests: write
issues: write
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: harupy/auto-labeling@master
sparse-checkout: |
.github
- uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
label-pattern: '- \[(.*?)\] ?`(.+?)`'
script: |
const script = require('./.github/workflows/labeling.js');
await script({ github, context });
1 change: 1 addition & 0 deletions github-actions/mlflow/maintainer-approval.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
jobs:
check:
runs-on: ubuntu-latest
timeout-minutes: 5
permissions:
pull-requests: read
steps:
Expand Down
2 changes: 2 additions & 0 deletions github-actions/mlflow/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,13 @@ jobs:
- uses: ./.github/actions/cache-pip
- name: Install dependencies
run: |
source ./dev/install-common-deps.sh
pip install .
- uses: ./.github/actions/show-versions
- name: Run tests
run: |
python -c "import sys; assert sys.version_info[:2] == (3, 10), sys.version_info"
pytest tests/types/test_type_hints.py
database:
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
Expand Down
1 change: 1 addition & 0 deletions github-actions/mlflow/recipe-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ jobs:
cd ${{ github.event.inputs.repository }} && pytest tests --rootdir .
recipe-windows:
runs-on: windows-latest
timeout-minutes: 120
permissions: {}
steps:
- uses: actions/checkout@v4
Expand Down
Loading

0 comments on commit 5f654e8

Please sign in to comment.