Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Check CML GitHub Action
on:
schedule:
- cron: 0 0 * * *
pull_request:
pull_request: {}

permissions:
contents: write
Expand All @@ -13,7 +13,10 @@ jobs:
verify:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v6
- uses: actions/setup-node@v4
with:
node-version: 24
- run: |
npm ci
npm run format
Expand All @@ -33,12 +36,16 @@ jobs:
- windows-latest
runs-on: ${{ matrix.system }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v6
- name: run action with latest
uses: ./
- name: test
run: cml --version
# cml comment/check create need a write-scoped token, which PRs from forks
# don't get (read-only GITHUB_TOKEN). Run this step only where the token can
# write: same-repo PRs and the scheduled run on the default branch.
- name: test CML
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
env:
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
Expand All @@ -58,7 +65,7 @@ jobs:
- windows-latest
runs-on: ${{ matrix.system }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v6
- name: run action with latest
uses: ./
with:
Expand All @@ -82,7 +89,7 @@ jobs:
- windows-latest
runs-on: ${{ matrix.system }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v6
- name: run action with latest
uses: ./
with:
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Note that CML does not include DVC and its dependencies (see the
## Note on v2

`v1` of setup-cml was a wrapper around a set of npm installs. `v2` installs CML from its
pre-packaged binaries. Then attempts to run `npm install --global canvas@2 vega@5 vega-cli@5 vega-lite@5`
pre-packaged binaries. Then attempts to run `npm install --global canvas@3 vega@6 vega-cli@6 vega-lite@6`
if you do not wish to install these tools pass `vega: false` to the action.

link to [`v1`](https://github.com/iterative/setup-cml/tree/v1)
Expand Down Expand Up @@ -74,7 +74,9 @@ The following inputs are supported.
to `latest` for the
[most recent CML release](https://github.com/iterative/cml/releases).
- `vega` - (optional) Whether to install vega dependencies. Defaults to `true`.
runs command `npm install --global canvas@2 vega@5 vega-cli@5 vega-lite@5`
runs command `npm install --global canvas@3 vega@6 vega-cli@6 vega-lite@6`
- `token` - (optional) GitHub token used to look up the CML release to install.
Defaults to `${{ github.token }}`; authenticating avoids GitHub API rate limits.

## A complete example

Expand Down
6 changes: 5 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,12 @@ inputs:
description: Whether to install Vega tools
default: 'true'
required: false
token:
description: GitHub token used to look up CML releases (avoids API rate limits).
default: ${{ github.token }}
required: false
runs:
using: node16
using: node24
Comment thread
rmarquis marked this conversation as resolved.
main: dist/index.js
branding:
icon: terminal
Expand Down
6 changes: 3 additions & 3 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14906,10 +14906,10 @@ function run() {
}
if (vega) {
try {
(0, exec_1.exec)('npm install --global canvas@2 vega@5 vega-cli@5 vega-lite@5');
yield (0, exec_1.exec)('npm install --global canvas@3 vega@6 vega-cli@6 vega-lite@6');
}
catch (error) {
core.warning('Failed to intall vega tools');
core.warning('Failed to install vega tools');
}
}
}
Expand All @@ -14921,7 +14921,7 @@ function run() {
function getCmlDownloadUrl(version, assetName) {
return __awaiter(this, void 0, void 0, function* () {
const octokit = new rest_1.Octokit({
token: process.env.GITHUB_TOKEN,
auth: core.getInput('token') || process.env.GITHUB_TOKEN,
request: {
fetch: node_fetch_1.default
}
Expand Down
Loading
Loading