|
1 |
| -# This workflow will install Python dependencies, run tests and lint with a variety of Python versions |
2 |
| -# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions |
3 |
| - |
4 |
| -name: BciPy |
5 |
| - |
6 |
| -on: |
7 |
| - push: |
8 |
| - branches: |
9 |
| - - main |
10 |
| - pull_request: |
11 |
| - branches: |
12 |
| - - '**' |
13 |
| - |
14 |
| -jobs: |
15 |
| - build-ubuntu: |
16 |
| - |
17 |
| - runs-on: ubuntu-latest |
18 |
| - strategy: |
19 |
| - fail-fast: false |
20 |
| - matrix: |
21 |
| - python-version: [3.7, 3.8] |
22 |
| - |
23 |
| - steps: |
24 |
| - - uses: actions/checkout@v2 |
25 |
| - - name: Set up Python ${{ matrix.python-version }} |
26 |
| - uses: actions/setup-python@v2 |
27 |
| - with: |
28 |
| - python-version: ${{ matrix.python-version }} |
29 |
| - - name: Install dependencies |
30 |
| - run: | |
31 |
| - sudo apt-get update |
32 |
| - sudo apt-get install libgtk-3-dev |
33 |
| - sudo apt-get install freeglut3-dev |
34 |
| - sudo apt-get install freetype* |
35 |
| - sudo apt-get install portaudio* |
36 |
| - sudo apt-get install libsndfile* |
37 |
| - sudo apt-get install xvfb |
38 |
| - python -m pip install --upgrade pip |
39 |
| - pip install -r dev_requirements.txt |
40 |
| - pip install -e . |
41 |
| - - name: Lint with flake8 |
42 |
| - run: | |
43 |
| - # stop the build if there are Python syntax errors or undefined names |
44 |
| - flake8 bcipy |
45 |
| - - name: Unit test |
46 |
| - if: always() |
47 |
| - run: | |
48 |
| - set +e |
49 |
| - xvfb-run coverage run --branch --source=bcipy -m pytest --mpl -k "not slow" |
50 |
| - if [ $? -eq 0 ] |
51 |
| - then |
52 |
| - echo "Ubuntu run complete!" |
53 |
| - elif [ $? -eq 134 ] |
54 |
| - then |
55 |
| - echo "Ubuntu tests run successfully, memory issues may be present" |
56 |
| - exit 0 |
57 |
| - else |
58 |
| - echo "Ubuntu test failure" |
59 |
| - fi |
60 |
| -
|
61 |
| - build-windows: |
62 |
| - |
63 |
| - runs-on: windows-latest |
64 |
| - strategy: |
65 |
| - fail-fast: false |
66 |
| - matrix: |
67 |
| - python-version: [3.7, 3.8] |
68 |
| - |
69 |
| - steps: |
70 |
| - - uses: actions/checkout@v2 |
71 |
| - - name: Set up Python ${{ matrix.python-version }} |
72 |
| - uses: actions/setup-python@v2 |
73 |
| - with: |
74 |
| - python-version: ${{ matrix.python-version }} |
75 |
| - - name: Install dependencies |
76 |
| - run: | |
77 |
| - python -m pip install --upgrade pip |
78 |
| - pip install -r dev_requirements.txt |
79 |
| - pip install -e . |
80 |
| - - name: Lint with flake8 |
81 |
| - run: | |
82 |
| - # stop the build if there are Python syntax errors or undefined names |
83 |
| - flake8 bcipy |
84 |
| - - name: Unit test |
85 |
| - if: always() |
86 |
| - run: | |
87 |
| - coverage run --branch --source=bcipy -m pytest --mpl -k "not slow" |
88 |
| -
|
89 |
| - build-macos: |
90 |
| - |
91 |
| - runs-on: macos-latest |
92 |
| - strategy: |
93 |
| - fail-fast: false |
94 |
| - matrix: |
95 |
| - python-version: [3.7, 3.8] |
96 |
| - |
97 |
| - steps: |
98 |
| - - uses: actions/checkout@v2 |
99 |
| - - name: Set up Python ${{ matrix.python-version }} |
100 |
| - uses: actions/setup-python@v2 |
101 |
| - with: |
102 |
| - python-version: ${{ matrix.python-version }} |
103 |
| - - name: Install dependencies |
104 |
| - run: | |
105 |
| - python -m pip install --upgrade pip |
106 |
| - pip install -r dev_requirements.txt |
107 |
| - pip install -e . |
108 |
| - - name: Lint with flake8 |
109 |
| - run: | |
110 |
| - # stop the build if there are Python syntax errors or undefined names |
111 |
| - flake8 bcipy |
112 |
| - - name: Unit test |
113 |
| - if: always() |
114 |
| - run: | |
115 |
| - coverage run --branch --source=bcipy -m pytest --mpl -k "not slow" |
| 1 | +# This workflow will install Python dependencies, run tests and lint with a variety of Python versions |
| 2 | +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions |
| 3 | + |
| 4 | +name: BciPy |
| 5 | + |
| 6 | +on: |
| 7 | + push: |
| 8 | + branches: |
| 9 | + - main |
| 10 | + pull_request: |
| 11 | + branches: |
| 12 | + - '**' |
| 13 | + |
| 14 | +jobs: |
| 15 | + build-ubuntu: |
| 16 | + |
| 17 | + runs-on: ubuntu-latest |
| 18 | + strategy: |
| 19 | + fail-fast: false |
| 20 | + matrix: |
| 21 | + python-version: [3.7, 3.8] |
| 22 | + |
| 23 | + steps: |
| 24 | + - uses: actions/checkout@v2 |
| 25 | + - name: Set up Python ${{ matrix.python-version }} |
| 26 | + uses: actions/setup-python@v2 |
| 27 | + with: |
| 28 | + python-version: ${{ matrix.python-version }} |
| 29 | + - name: Install dependencies |
| 30 | + run: | |
| 31 | + sudo apt-get update |
| 32 | + sudo apt-get install libgtk-3-dev |
| 33 | + sudo apt-get install freeglut3-dev |
| 34 | + sudo apt-get install freetype* |
| 35 | + sudo apt-get install portaudio* |
| 36 | + sudo apt-get install libsndfile* |
| 37 | + sudo apt-get install xvfb |
| 38 | + python -m pip install --upgrade pip |
| 39 | + pip install -r dev_requirements.txt |
| 40 | + pip install -e . |
| 41 | + - name: Lint with flake8 |
| 42 | + run: | |
| 43 | + # stop the build if there are Python syntax errors or undefined names |
| 44 | + flake8 bcipy |
| 45 | + - name: Unit test |
| 46 | + if: always() |
| 47 | + run: | |
| 48 | + set +e |
| 49 | + xvfb-run coverage run --branch --source=bcipy -m pytest --mpl -k "not slow" |
| 50 | + if [ $? -eq 0 ] |
| 51 | + then |
| 52 | + echo "Ubuntu run complete!" |
| 53 | + elif [ $? -eq 134 ] |
| 54 | + then |
| 55 | + echo "Ubuntu tests run successfully, memory issues may be present" |
| 56 | + exit 0 |
| 57 | + else |
| 58 | + echo "Ubuntu test failure" |
| 59 | + fi |
| 60 | +
|
| 61 | + build-windows: |
| 62 | + |
| 63 | + runs-on: windows-latest |
| 64 | + strategy: |
| 65 | + fail-fast: false |
| 66 | + matrix: |
| 67 | + python-version: [3.7, 3.8] |
| 68 | + |
| 69 | + steps: |
| 70 | + - uses: actions/checkout@v2 |
| 71 | + - name: Set up Python ${{ matrix.python-version }} |
| 72 | + uses: actions/setup-python@v2 |
| 73 | + with: |
| 74 | + python-version: ${{ matrix.python-version }} |
| 75 | + - name: Install dependencies |
| 76 | + run: | |
| 77 | + python -m pip install --upgrade pip |
| 78 | + pip install -r dev_requirements.txt |
| 79 | + pip install WxPython==4.1.1 |
| 80 | + pip install -e . |
| 81 | + - name: Lint with flake8 |
| 82 | + run: | |
| 83 | + # stop the build if there are Python syntax errors or undefined names |
| 84 | + flake8 bcipy |
| 85 | + - name: Unit test |
| 86 | + if: always() |
| 87 | + run: | |
| 88 | + coverage run --branch --source=bcipy -m pytest --mpl -k "not slow" |
| 89 | +
|
| 90 | + build-macos: |
| 91 | + |
| 92 | + runs-on: macos-latest |
| 93 | + strategy: |
| 94 | + fail-fast: false |
| 95 | + matrix: |
| 96 | + python-version: [3.7, 3.8] |
| 97 | + |
| 98 | + steps: |
| 99 | + - uses: actions/checkout@v2 |
| 100 | + - name: Set up Python ${{ matrix.python-version }} |
| 101 | + uses: actions/setup-python@v2 |
| 102 | + with: |
| 103 | + python-version: ${{ matrix.python-version }} |
| 104 | + - name: Install dependencies |
| 105 | + run: | |
| 106 | + python -m pip install --upgrade pip |
| 107 | + pip install -r dev_requirements.txt |
| 108 | + pip install WxPython==4.1.1 |
| 109 | + pip install -e . |
| 110 | + - name: Lint with flake8 |
| 111 | + run: | |
| 112 | + # stop the build if there are Python syntax errors or undefined names |
| 113 | + flake8 bcipy |
| 114 | + - name: Unit test |
| 115 | + if: always() |
| 116 | + run: | |
| 117 | + coverage run --branch --source=bcipy -m pytest --mpl -k "not slow" |
0 commit comments