Skip to content
This repository has been archived by the owner on Sep 21, 2021. It is now read-only.

Commit

Permalink
[FIX] Point to new nbmake release (#59)
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-treebeard authored Dec 11, 2020
1 parent dfeac34 commit e53c511
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 9 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ Tests notebooks using [nbmake](https://github.com/treebeardtech/nbmake) via pyte
## Quick Start

```yaml
- uses: "treebeardtech/nbmake@v0.2"
- uses: "treebeardtech/nbmake-action@v0.2"
with:
path: "./examples"
html: true
path-output: .
notebooks: |
nb1.ipynb
'sub dir/*.ipynb'
Expand Down
1 change: 0 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ inputs:
path-output:
description: "Create an html report to `{path_output}_build/html`"
required: false
default: "."

overwrite:
description: >
Expand Down
8 changes: 6 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2866,7 +2866,7 @@ function run() {
const notebooks = core.getInput('notebooks');
const ignore = core.getInput('ignore');
const workdir = core.getInput('workdir');
const pathOutput = path.resolve(core.getInput('path-output'));
const pathOutput = core.getInput('path-output') && path.resolve(core.getInput('path-output'));
const verbose = core.getInput('verbose').toLowerCase() === 'true';
const overwrite = core.getInput('overwrite').toLowerCase() === 'true';
const extraPytestArgs = core.getInput('extra-pytest-args');
Expand All @@ -2875,7 +2875,11 @@ function run() {
yield exec.exec('bash', ['-c', 'pwd && ls -la']);
}
core.startGroup('Install test packages');
yield exec.exec('pip install pytest "git+https://github.com/treebeardtech/nbmake.git@main"');
// const pkg = `git+https://github.com/treebeardtech/nbmake.git@main${
// pathOutput ? '#egg=nbmake[html]' : ''
// }`
const pkg = `nbmake${pathOutput ? '[html]' : ''}==0.1`;
yield exec.exec(`pip install ${pkg}`);
core.endGroup();
const paths = notebooks.split('\n').filter(n => n);
const ignores = ignore.split('\n').filter(i => i);
Expand Down
11 changes: 7 additions & 4 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ async function run(): Promise<void> {
const notebooks = core.getInput('notebooks')
const ignore = core.getInput('ignore')
const workdir = core.getInput('workdir')
const pathOutput = path.resolve(core.getInput('path-output'))
const pathOutput =
core.getInput('path-output') && path.resolve(core.getInput('path-output'))
const verbose = core.getInput('verbose').toLowerCase() === 'true'
const overwrite = core.getInput('overwrite').toLowerCase() === 'true'
const extraPytestArgs = core.getInput('extra-pytest-args')
Expand All @@ -23,9 +24,11 @@ async function run(): Promise<void> {
}

core.startGroup('Install test packages')
await exec.exec(
'pip install pytest "git+https://github.com/treebeardtech/nbmake.git@main"'
)
// const pkg = `git+https://github.com/treebeardtech/nbmake.git@main${
// pathOutput ? '#egg=nbmake[html]' : ''
// }`
const pkg = `nbmake${pathOutput ? '[html]' : ''}==0.1`
await exec.exec(`pip install ${pkg}`)
core.endGroup()

const paths = notebooks.split('\n').filter(n => n)
Expand Down

0 comments on commit e53c511

Please sign in to comment.