-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
misc fixes & linting #31
Changes from all commits
1291c11
6838c32
3cd53fa
f6c6881
87d5990
316774e
65fdd39
826fcfd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,71 +1,66 @@ | ||
name: "Check CML GitHub Action" | ||
|
||
name: Check CML GitHub Action | ||
on: [push] | ||
|
||
jobs: | ||
check: | ||
if: "!contains(github.event.head_commit.message, '[ci skip]')" | ||
defaults: | ||
run: | ||
shell: bash | ||
strategy: | ||
matrix: | ||
runs-on: [ '{"runs-on": "ubuntu-latest"}', | ||
'{"runs-on": "macos-latest"}', | ||
'{"runs-on": "ubuntu-latest", "container": "ubuntu:18.04"}', | ||
'{"runs-on": "windows-latest"}'] | ||
|
||
runs-on: ${{ fromJSON(matrix.runs-on).runs-on }} | ||
container: ${{ fromJSON(matrix.runs-on).container }} | ||
|
||
system: | ||
- ubuntu-latest | ||
- macos-latest | ||
- windows-latest | ||
include: | ||
- system: ubuntu-18.04 | ||
container: ubuntu:18.04 | ||
runs-on: ${{ matrix.system }} | ||
container: ${{ matrix.container }} | ||
steps: | ||
- name: "git" | ||
if: "fromJSON(matrix.runs-on).container == 'ubuntu:18.04'" | ||
- name: install deps | ||
if: matrix.container == 'ubuntu:18.04' | ||
run: | | ||
apt update -y | ||
apt install software-properties-common -y | ||
apt update | ||
apt install -y software-properties-common | ||
add-apt-repository ppa:git-core/ppa | ||
apt -y update && apt install -y git | ||
|
||
apt update | ||
apt install -y git fontconfig make gcc pkg-config | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should we document these deps? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. #23; probably (?) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. alternatively we could add this to the action itself? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. They're there just because the Ubuntu Docker images are really bare-bones and doesn't include them. We can include them in the action, but that would imply including operating system checks. What if users choose a container with Alpine Linux? 🤔 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It would be safer to either ignore or document them. |
||
- uses: actions/checkout@v2 | ||
|
||
- uses: actions/setup-node@v1 | ||
if: "fromJSON(matrix.runs-on).container == 'ubuntu:18.04' | ||
|| contains(fromJSON(matrix.runs-on).runs-on, 'windows')" | ||
- uses: actions/setup-node@v2 | ||
if: | ||
matrix.container == 'ubuntu:18.04' || matrix.system == | ||
'windows-latest' | ||
with: | ||
node-version: '12' | ||
|
||
- uses: iterative/setup-cml@v1 | ||
- run: npm ci | ||
- run: npm run lint | ||
- run: npm run test | ||
casperdcl marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- name: local action with '0.3.0' | ||
uses: ./ | ||
with: | ||
version: '0.1.30' | ||
|
||
- name: "CML specific version test" | ||
if: "!contains(fromJSON(matrix.runs-on).runs-on, 'windows')" | ||
version: '0.3.0' | ||
- name: test CML specific version | ||
if: matrix.system != 'windows-latest' | ||
run: | | ||
CML_VER=$(npm list -g --depth=0 | grep dvcorg/cml | cut -d'@' -f 3) | ||
if [ $CML_VER != '0.1.30' ]; then | ||
CML_VER="$(cml-publish --version 2>&1)" | ||
if [ "$CML_VER" != '0.3.0' ]; then | ||
exit 1 | ||
fi | ||
|
||
- uses: iterative/setup-cml@v1 | ||
|
||
- name: "CML unistall and install latest test" | ||
if: "!contains(fromJSON(matrix.runs-on).runs-on, 'windows')" | ||
- name: local action with defaults | ||
uses: ./ | ||
- name: test CML latest version | ||
if: matrix.system != 'windows-latest' | ||
run: | | ||
CML_VER=$(npm list -g --depth=0 | grep dvcorg/cml | cut -d'@' -f 3) | ||
echo $CML_VER | ||
if [ $CML_VER == '0.1.30' ]; then | ||
CML_VER="$(cml-publish --version 2>&1)" | ||
if [ "$CML_VER" == '0.3.0' ]; then | ||
exit 1 | ||
fi | ||
|
||
- name: "Install fontconfig" | ||
if: "contains(fromJSON(matrix.runs-on).container, 'ubuntu:18.04')" | ||
run: apt install --yes fontconfig | ||
|
||
- name: "CML test" | ||
if: "!contains(fromJSON(matrix.runs-on).runs-on, 'windows')" | ||
- name: test CML | ||
env: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
echo 'Hello CML!' > report.md | ||
echo 'Hello CML from ${{ matrix.system }}!' > report.md | ||
|
||
vl2svg assets/vega-lite.json | cml-publish --md >> report.md | ||
vl2png assets/vega-lite.json | cml-publish --md >> report.md | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
name: 'Setup CML (Continuous Machine Learning)' | ||
description: 'Sets up CML (Continuous Machine Learning) in your GitHub Actions workflow.' | ||
author: 'Iterative, Inc.' | ||
name: Setup CML (Continuous Machine Learning) | ||
description: Sets up CML (Continuous Machine Learning) - https://cml.dev. | ||
author: Iterative, Inc. | ||
inputs: | ||
version: | ||
description: 'The version of CML to install. A value of `latest` will install the latest version of CML. Defaults to `latest`.' | ||
default: 'latest' | ||
description: The version of CML to install (e.g. '3.0.0'). | ||
default: latest | ||
required: false | ||
runs: | ||
using: 'node12' | ||
main: 'dist/index.js' | ||
using: node12 | ||
main: dist/index.js | ||
branding: | ||
icon: 'terminal' | ||
color: 'purple' | ||
icon: terminal | ||
color: purple |
This comment was marked as off-topic.
Sorry, something went wrong.