|
| 1 | +name: Test-devel |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [develop] |
| 6 | + pull_request: |
| 7 | + branches: [develop] |
| 8 | + |
| 9 | +jobs: |
| 10 | + test: |
| 11 | + name: dev ${{ matrix.os }}, py-${{ matrix.python-version }} |
| 12 | + runs-on: ${{ matrix.os }} |
| 13 | + strategy: |
| 14 | + fail-fast: true |
| 15 | + matrix: |
| 16 | + os: [ubuntu-18.04, windows-latest, macOS-latest] |
| 17 | + python-version: ["3.6"] |
| 18 | + defaults: |
| 19 | + run: |
| 20 | + shell: bash |
| 21 | + steps: |
| 22 | + - uses: actions/checkout@v2 |
| 23 | + |
| 24 | + - name: Setup Python |
| 25 | + uses: actions/setup-python@v2 |
| 26 | + with: |
| 27 | + python-version: ${{ matrix.python-version }} |
| 28 | + |
| 29 | + - uses: pre-commit/[email protected] |
| 30 | + |
| 31 | + - name: Install Poetry |
| 32 | + |
| 33 | + with: |
| 34 | + virtualenvs-create: true |
| 35 | + virtualenvs-in-project: true |
| 36 | + |
| 37 | + - name: Load cached venv |
| 38 | + if: runner.os != 'Windows' |
| 39 | + id: cached-poetry-dependencies |
| 40 | + uses: actions/cache@v2 |
| 41 | + with: |
| 42 | + path: .venv |
| 43 | + key: |
| 44 | + testvenv-${{ matrix.os }}-py${{matrix.python-version}}-${{ |
| 45 | + hashFiles('**/poetry.lock') }} |
| 46 | + |
| 47 | + - name: Install dependencies |
| 48 | + if: | |
| 49 | + (runner.os != 'Windows') && |
| 50 | + (steps.cached-poetry-dependencies.outputs.cache-hit != 'true') |
| 51 | + run: poetry install --no-interaction --no-root --no-dev |
| 52 | + |
| 53 | + - name: Install library |
| 54 | + run: poetry install --no-interaction --no-dev |
| 55 | + |
| 56 | + - name: Run tests |
| 57 | + run: | |
| 58 | + source $VENV |
| 59 | + poetry run coverage run -m unittest moabb.tests |
| 60 | +
|
| 61 | + - name: Run pipelines |
| 62 | + run: | |
| 63 | + source $VENV |
| 64 | + poetry run python -m moabb.run --pipelines=./moabb/tests/test_pipelines/ --verbose |
| 65 | +
|
| 66 | + - name: Upload Coverage to Codecov |
| 67 | + uses: codecov/codecov-action@v2 |
| 68 | + if: success() |
| 69 | + with: |
| 70 | + verbose: true |
| 71 | + directory: /home/runner/work/moabb/moabb |
| 72 | + files: ./.coverage |
0 commit comments