Skip to content

Commit

Permalink
Enable running tests using GitHub actions (#225)
Browse files Browse the repository at this point in the history
Enable GitHub Actions to run project build/tests 
on every PR or commit

Fixes #264
  • Loading branch information
lresende committed Feb 15, 2020
1 parent ca6cf95 commit 1ace50f
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 4 deletions.
63 changes: 63 additions & 0 deletions .github/workflows/pythonapp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Elyra Tests (1.x)
on:
push:
branches:
- master
pull_request:
branches: '*'

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: [ '3.6', '3.7', '3.8' ]
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
architecture: 'x64'
- name: Set up Node
uses: actions/setup-node@v1
with:
node-version: '12.13'
- name: Display dependency info
run: |
python --version
node --version
npm --version
pip --version
- name: Create npm configuration for authentication
run: |
echo "@elyra-ai:registry=https://npm.pkg.github.com/" >> ~/.npmrc
echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_PERSONAL_TOKEN }}" >> ~/.npmrc
echo "always-auth=true" >> ~/.npmrc
echo "scripts-prepend-node-path=true" >> ~/.npmrc
echo "prefix=~/.npm-global" >> ~/.npmrc
mkdir -p ~/.npm-global
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip wheel flake8 notebook jupyterlab
- name: Install NPM dependencies
run: |
sudo apt install yarn
npm install -g lerna@3.19.0
npm install -g rimraf@3.0.0
npm install -g typescript@3.7.3
npm install -g yarn@1.21.0
- name: Build
run: |
export PATH=~/.npm-global/bin:$PATH
make install
- name: Test with pytest
run: |
pip install pytest pytest-console-scripts
make test
- name: Collect logs
if: failure()
run: cat /tmp/jupyterlab-debug-*.log
2 changes: 1 addition & 1 deletion packages/pipeline-editor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"@phosphor/widgets": "^1.8.1",
"@types/jest": "24.0.15",
"@types/node": "^12.0.10",
"@elyra/canvas": "^6.1.23",
"@elyra-ai/canvas": "^6.1.23",
"@elyra/application": "^0.4.0",
"autoprefixer": "^9.6.0",
"carbon-components": "^10.3.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/pipeline-editor/src/common-canvas.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
* limitations under the License.
*/

declare module '@elyra/canvas';
declare module '@elyra-ai/canvas';
4 changes: 2 additions & 2 deletions packages/pipeline-editor/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ import {toArray} from '@phosphor/algorithm';
import {IDragEvent} from '@phosphor/dragdrop';
import {Widget, PanelLayout} from '@phosphor/widgets';

import {CommonCanvas, CanvasController, CommonProperties} from '@elyra/canvas';
import '@elyra/canvas/dist/common-canvas.min.css';
import {CommonCanvas, CanvasController, CommonProperties} from '@elyra-ai/canvas';
import '@elyra-ai/canvas/dist/common-canvas.min.css';
import {NotebookParser, SubmissionHandler} from "@elyra/application";
import 'carbon-components/css/carbon-components.min.css';
import '../style/index.css';
Expand Down

0 comments on commit 1ace50f

Please sign in to comment.