|
| 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: Python package |
| 5 | + |
| 6 | +on: |
| 7 | + push: |
| 8 | + branches: [ master ] |
| 9 | + pull_request: |
| 10 | + branches: [ master ] |
| 11 | + |
| 12 | +jobs: |
| 13 | + build: |
| 14 | + |
| 15 | + runs-on: ubuntu-latest |
| 16 | + strategy: |
| 17 | + matrix: |
| 18 | + python-version: [3.7] |
| 19 | + numpy_version: ['==1.16.4'] |
| 20 | + steps: |
| 21 | + - uses: actions/checkout@v2 |
| 22 | + with: |
| 23 | + fetch-depth: 0 |
| 24 | + - name: Setup Miniconda |
| 25 | + uses: conda-incubator/setup-miniconda@master |
| 26 | + with: |
| 27 | + channels: conda-forge |
| 28 | + python-version: ${{ matrix.python-version }} |
| 29 | + env: |
| 30 | + ACTIONS_ALLOW_UNSECURE_COMMANDS: true |
| 31 | + # Runs a set of commands using the runners shell |
| 32 | + - name: Create Conda environment with the rights deps |
| 33 | + shell: "bash -l {0}" |
| 34 | + run: | |
| 35 | + conda create -n zarr-env python==${{matrix.python-version}} bsddb3 numcodecs==0.6.4 lmdb pip |
| 36 | + - name: Install dependencies |
| 37 | + shell: "bash -l {0}" |
| 38 | + run: | |
| 39 | + conda activate zarr-env |
| 40 | + python -m pip install --upgrade pip |
| 41 | + python -m pip install -U pip setuptools wheel codecov |
| 42 | + python -m pip install -rrequirements_dev_minimal.txt numpy${{ matrix.numpy_version}} -rrequirements_dev_optional.txt |
| 43 | + python -m pip install -e . |
| 44 | + - name: Tests |
| 45 | + shell: "bash -l {0}" |
| 46 | + run: | |
| 47 | + conda activate zarr-env |
| 48 | + pytest --cov=zarr --cov-config=.coveragerc --doctest-plus --cov-report xml --cov=./ |
| 49 | + - uses: codecov/codecov-action@v1 |
| 50 | + with: |
| 51 | + #token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos |
| 52 | + #files: ./coverage1.xml,./coverage2.xml # optional |
| 53 | + #flags: unittests # optional |
| 54 | + #name: codecov-umbrella # optional |
| 55 | + #fail_ci_if_error: true # optional (default = false) |
| 56 | + verbose: true # optional (default = false) |
0 commit comments