Add test coverage to git actions #318
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: pytest | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
test: | |
name: Test pip install python ${{ matrix.python-version }} on ${{ matrix.os }} with zarr ${{ matrix.zarr-version }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
python-version: ["3.8", "3.9", "3.10"] | |
zarr-version: [">=2,<3", ">2,<=3"] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install package with pip | |
run: | | |
python -m pip install . "zarr${{ matrix.zarr-version }}" | |
python -m pip install pytest | |
python -m pip install pytest-coverage | |
- name: Run tests | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
run: | | |
python -m pytest tests/ --cov mllam_data_prep --cov-fail-under=100 --cov-report term-missing |