forked from microsoft/hi-ml
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Publish two packages (microsoft#106)
* Move existing code into hi-ml-azure * Create new package in hi-ml * Create top level files
- Loading branch information
1 parent
46b2d3f
commit 3cac37f
Showing
75 changed files
with
8,054 additions
and
358 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
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,59 @@ | ||
name: 'Download package artifacts' | ||
description: 'Download and parse all package artifacts' | ||
inputs: | ||
folder: # id of input | ||
description: 'Target folder' | ||
required: true | ||
package_type: | ||
description: 'Package type' | ||
required: false | ||
default: '*.whl' | ||
outputs: | ||
package_filename: | ||
description: 'Package filename' | ||
value: ${{ steps.set_output.outputs.package_filename }} | ||
package_name: | ||
description: 'Package name' | ||
value: ${{ steps.set_output.outputs.package_name }} | ||
latest_version: | ||
description: 'Latest version' | ||
value: ${{ steps.set_output.outputs.latest_version }} | ||
package_version: | ||
description: 'Package version string' | ||
value: ${{ steps.set_output.outputs.package_version }} | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Download distribution artifact | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: ${{ inputs.folder }}${{ env.HIML_DIST_ARTIFACT_SUFFIX }} | ||
path: ${{ inputs.folder }}/dist | ||
|
||
- name: Download package name artifact | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: ${{ inputs.folder }}${{ env.HIML_PACKAGE_NAME_ARTIFACT_SUFFIX }} | ||
path: ${{ inputs.folder }} | ||
|
||
- name: Download version artifact | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: ${{ inputs.folder }}${{ env.HIML_VERSION_ARTIFACT_SUFFIX }} | ||
path: ${{ inputs.folder }} | ||
|
||
- name: Set output | ||
id: set_output | ||
shell: bash | ||
run: | | ||
cd ${{ inputs.folder }} | ||
package_filename=$(find dist -name ${{ inputs.package_type }}) | ||
package_name=$(cat ./package_name.txt) | ||
latest_version=$(cat ./latest_version.txt) | ||
package_version=$package_name==$latest_version | ||
echo "::set-output name=package_filename::$package_filename" | ||
echo "::set-output name=package_name::$package_name" | ||
echo "::set-output name=latest_version::$latest_version" | ||
echo "::set-output name=package_version::$package_version" |
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,15 @@ | ||
# Format coverage action | ||
|
||
This action loads the file coverage.txt produced by pytest-cov, formats it as an HTML table, and adds it to the commit as a comment. | ||
|
||
## Build | ||
|
||
Following the instructions: [https://docs.github.com/en/actions/creating-actions/creating-a-javascript-action](https://docs.github.com/en/actions/creating-actions/creating-a-javascript-action): | ||
|
||
1. Install nodejs and npm | ||
|
||
1. Install vercel/ncc by running this command in your terminal. npm i -g @vercel/ncc | ||
|
||
1. Compile your index.js file. ncc build index.js --license licenses.txt | ||
|
||
You'll see a new dist/index.js file with your code and the compiled modules. You will also see an accompanying dist/licenses.txt file containing all the licenses of the node_modules you are using. |
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,12 @@ | ||
name: 'format_coverage' | ||
description: 'Format pytest-cov report for github comment' | ||
inputs: | ||
file: # id of input | ||
description: 'Coverage.txt file name' | ||
required: true | ||
token: # id of input | ||
description: 'Token with access to your repository' | ||
required: true | ||
runs: | ||
using: 'node12' | ||
main: 'dist/index.js' |
Oops, something went wrong.