-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
54 additions
and
61 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 |
---|---|---|
@@ -1,60 +1,50 @@ | ||
name: "Check DVC GitHub Action" | ||
|
||
name: Check DVC GitHub Action | ||
on: [push] | ||
|
||
jobs: | ||
check: | ||
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 }} | ||
|
||
os: | ||
[ | ||
'{"runs-on": "ubuntu-latest"}', | ||
'{"runs-on": "macos-latest"}', | ||
'{"runs-on": "ubuntu-latest", "container": "ubuntu:18.04"}', | ||
'{"runs-on": "windows-latest"}', | ||
] | ||
runs-on: ${{ fromJSON(matrix.os).runs-on }} | ||
container: ${{ fromJSON(matrix.os).container }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: actions/setup-node@v1 | ||
if: "fromJSON(matrix.runs-on).container == 'ubuntu:18.04'" | ||
with: | ||
node-version: '12' | ||
|
||
- uses: actions/setup-python@v2 | ||
if: "contains(fromJSON(matrix.runs-on).runs-on, 'windows')" | ||
with: | ||
python-version: '3.x' | ||
|
||
- name: "npm ci" | ||
run: npm ci | ||
|
||
- name: "lint" | ||
run: npm run lint | ||
|
||
- name: "tests" | ||
run: | | ||
npm run test | ||
- uses: iterative/setup-dvc@v1 | ||
with: | ||
version: '1.0.1' | ||
|
||
- name: "DVC test" | ||
if: "!contains(fromJSON(matrix.runs-on).runs-on, 'windows')" | ||
run: | | ||
DVC_VER=$(dvc --version) | ||
if [ $DVC_VER != '1.0.1' ]; then | ||
exit 1 | ||
fi | ||
- uses: iterative/setup-dvc@v1 | ||
with: | ||
version: latest | ||
|
||
- name: "DVC test" | ||
if: "!contains(fromJSON(matrix.runs-on).runs-on, 'windows')" | ||
run: | | ||
DVC_VER=$(dvc --version) | ||
if [ $DVC_VER == '1.0.1' ]; then | ||
exit 1 | ||
fi | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v1 | ||
if: "fromJSON(matrix.os).container == 'ubuntu:18.04'" | ||
with: | ||
node-version: '12' | ||
- uses: actions/setup-python@v2 | ||
if: "contains(fromJSON(matrix.os).runs-on, 'windows')" | ||
with: | ||
python-version: '3.x' | ||
- run: npm ci | ||
- run: npm run lint | ||
- run: npm run test | ||
- name: run local action with '1.0.1' | ||
uses: ./.github/.. | ||
with: | ||
version: '1.0.1' | ||
- name: test DVC version | ||
if: "!contains(fromJSON(matrix.os).runs-on, 'windows')" | ||
run: | | ||
DVC_VER=$(dvc --version) | ||
if [ $DVC_VER != '1.0.1' ]; then | ||
exit 1 | ||
fi | ||
- name: run local action with 'latest' | ||
uses: ./.github/.. | ||
with: | ||
version: latest | ||
- name: test DVC version | ||
if: "!contains(fromJSON(matrix.os).runs-on, 'windows')" | ||
run: | | ||
DVC_VER=$(dvc --version) | ||
if [ $DVC_VER == '1.0.1' ]; then | ||
exit 1 | ||
fi |
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 |
---|---|---|
@@ -1,14 +1,17 @@ | ||
name: 'Setup DVC (Data Version Control)' | ||
description: 'Sets up DVC (Data Version Control) in your GitHub Actions workflow.' | ||
description: | ||
'Sets up DVC (Data Version Control) in your GitHub Actions workflow.' | ||
author: 'Iterative, Inc.' | ||
inputs: | ||
version: | ||
description: 'The version of DVC to install. A value of `latest` will install the latest version of DVC. Defaults to `latest`.' | ||
default: 'latest' | ||
description: | ||
'The version of DVC to install. A value of `latest` will install the | ||
latest version of DVC. Defaults to `latest`.' | ||
default: latest | ||
required: false | ||
runs: | ||
using: 'node12' | ||
using: node12 | ||
main: 'dist/index.js' | ||
branding: | ||
icon: 'terminal' | ||
color: 'purple' | ||
icon: terminal | ||
color: purple |
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 |
---|---|---|
|
@@ -40,7 +40,7 @@ | |
"*.js": [ | ||
"eslint --fix" | ||
], | ||
"*.md": [ | ||
"*.{md,yaml,yml}": [ | ||
"prettier --write" | ||
] | ||
}, | ||
|