forked from neocortix/ncscli
-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (44 loc) · 1.55 KB
/
python-package.yml
File metadata and controls
50 lines (44 loc) · 1.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# This workflow will install Python dependencies, run tests at least one Python version
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Python package
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.9]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Set up Java
uses: actions/setup-java@v1
with:
java-version: '11.0.x'
- name: Install dependencies
run: |
sudo apt-get install crossbuild-essential-arm64
python -m pip install --upgrade pip
pip install flake8 pytest
pip install requests>=2.12.4, asyncssh>=1.16.1, matplotlib
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Test with pytest
env:
NCS_AUTH_TOKEN: ${{ secrets.NCS_AUTH_TOKEN }}
run: |
ssh-keygen -q -f ~/.ssh/id_rsa -t rsa -N ''
export PYTHONPATH=$PWD
export PATH=$PWD'/ncscli':$PATH
cd examples/batchMode
./pytestQuick.sh
- name: Upload output data as artifacts
uses: actions/upload-artifact@v2
with:
name: batchExamples-data-${{ matrix.python-version }}
path: examples/batchMode/data
# Use always() to always run this step to publish test results when there are test failures
if: ${{ always() }}