|
| 1 | +name: netneurotools tests |
| 2 | + |
| 3 | +on: [push, pull_request] |
| 4 | + |
| 5 | +jobs: |
| 6 | + check_skip: |
| 7 | + runs-on: ubuntu-latest |
| 8 | + outputs: |
| 9 | + skip: ${{ steps.result_step.outputs.ci-skip }} |
| 10 | + steps: |
| 11 | + - uses: actions/checkout@v2 |
| 12 | + with: |
| 13 | + fetch-depth: 0 |
| 14 | + - id: result_step |
| 15 | + uses: mstachniuk/ci-skip@master |
| 16 | + with: |
| 17 | + commit-filter: '[skip ci];[ci skip];[skip github]' |
| 18 | + commit-filter-separator: ';' |
| 19 | + |
| 20 | + checks: |
| 21 | + needs: check_skip |
| 22 | + if: ${{ needs.check_skip.outputs.skip == 'false' }} |
| 23 | + runs-on: ${{ matrix.os }} |
| 24 | + strategy: |
| 25 | + matrix: |
| 26 | + os: ['ubuntu-latest', 'windows-latest', 'macos-latest'] |
| 27 | + python-version: ['3.6', '3.7', '3.8', '3.9'] |
| 28 | + install: ['setup'] |
| 29 | + check: ['test'] |
| 30 | + optional-depends: [''] |
| 31 | + include: |
| 32 | + - os: ubuntu-latest |
| 33 | + python-version: 3.8 |
| 34 | + install: setup |
| 35 | + check: style |
| 36 | + optional-depends: '' |
| 37 | + - os: ubuntu-latest |
| 38 | + python-version: 3.8 |
| 39 | + install: setup |
| 40 | + check: doc |
| 41 | + optional-depends: '' |
| 42 | + - os: ubuntu-latest |
| 43 | + python-version: 3.8 |
| 44 | + install: setup |
| 45 | + check: test |
| 46 | + optional-depends: numba |
| 47 | + - os: ubuntu-latest |
| 48 | + python-version: 3.8 |
| 49 | + install: sdist |
| 50 | + check: test |
| 51 | + optional-depends: '' |
| 52 | + - os: ubuntu-latest |
| 53 | + python-version: 3.8 |
| 54 | + install: bdist_wheel |
| 55 | + check: test |
| 56 | + optional-depends: '' |
| 57 | + exclude: |
| 58 | + - os: ubuntu-latest |
| 59 | + architecture: x86 |
| 60 | + - os: macos-latest |
| 61 | + architecture: x86 |
| 62 | + env: |
| 63 | + INSTALL_TYPE: ${{ matrix.install }} |
| 64 | + CHECK_TYPE: ${{ matrix.check }} |
| 65 | + OPTIONAL_DEPENDS: ${{ matrix.optional-depends }} |
| 66 | + steps: |
| 67 | + - uses: actions/checkout@v2 |
| 68 | + with: |
| 69 | + submodules: recursive |
| 70 | + fetch-depth: 0 |
| 71 | + - name: Set up Python ${{ matrix.python-version }} |
| 72 | + uses: actions/setup-python@v2 |
| 73 | + with: |
| 74 | + python-version: ${{ matrix.python-version }} |
| 75 | + - name: 'Display Python version' |
| 76 | + run: python -c "import sys; print(sys.version)" |
| 77 | + - name: 'Install dependencies' |
| 78 | + run: ./tools/install_dependencies.sh |
| 79 | + - name: 'Install netneurotools' |
| 80 | + run: ./tools/install_package.sh |
| 81 | + - name: 'Run tests' |
| 82 | + run: ./tools/run_checks.sh |
| 83 | + - uses: codecov/codecov-action@v1 |
| 84 | + with: |
| 85 | + file: for_testing/coverage.xml |
| 86 | + if: ${{ always() }} |
| 87 | + - name: Upload pytest test results |
| 88 | + uses: actions/upload-artifact@v2 |
| 89 | + with: |
| 90 | + name: pytest-results-${{ matrix.os }}-${{ matrix.python-version }} |
| 91 | + path: for_testing/test-results.xml |
| 92 | + if: ${{ always() && matrix.check == 'test' }} |
0 commit comments