Skip to content

Update EchoData examples in docs (#1089) #178

Update EchoData examples in docs (#1089)

Update EchoData examples in docs (#1089) #178

Workflow file for this run

name: build
on:
push:
branches:
- dev
- main
paths-ignore: ["**/docker.yaml"]
workflow_dispatch:
env:
CONDA_ENV: echopype
NUM_WORKERS: 2
jobs:
test:
name: ${{ matrix.python-version }}-build
runs-on: ubuntu-20.04
if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }}
continue-on-error: ${{ matrix.experimental }}
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10"]
runs-on: [ubuntu-latest]
experimental: [false]
# TODO: Uncomment when netcdf is unpinned
# include:
# - runs-on: ubuntu-latest
# python-version: "3.11"
# experimental: true
services:
# TODO: figure out how to update tag when there's a new one
minio:
image: cormorack/minioci:latest
ports:
- 9000:9000
httpserver:
image: cormorack/http:latest
ports:
- 8080:80
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all history for all branches and tags.
- name: Set environment variables
run: |
echo "PYTHON_VERSION=${{ matrix.python-version }}" >> $GITHUB_ENV
- name: Setup micromamba
uses: mamba-org/setup-micromamba@v1
with:
environment-file: .ci_helpers/py${{ matrix.python-version }}.yaml
environment-name: ${{ env.CONDA_ENV }}
cache-environment: true
post-cleanup: 'all'
- name: Print conda environment
shell: bash -l {0}
run: |
micromamba info
micromamba list
- name: Remove docker-compose python
if: ${{ matrix.python-version == '3.10' || matrix.python-version == '3.11' }}
shell: bash -l {0}
run: sed -i "/docker-compose/d" requirements-dev.txt
- name: Install dev tools
shell: bash -l {0}
run: |
micromamba install -c conda-forge -n ${{ env.CONDA_ENV }} --yes --file requirements-dev.txt
- name: Install echopype
shell: bash -l {0}
run: |
python -m pip install -e .[plot]
- name: Copying test data to services
shell: bash -l {0}
run: |
python .ci_helpers/docker/setup-services.py --deploy --data-only --http-server ${{ job.services.httpserver.id }}
# Check data endpoint
curl http://localhost:8080/data/
- name: Running All Tests
shell: bash -l {0}
run: |
pytest -vv -rx --numprocesses=${{ env.NUM_WORKERS }} --max-worker-restart=3 --cov=echopype --cov-report=xml --log-cli-level=WARNING --disable-warnings |& tee ci_${{ matrix.python-version }}_test_log.log
- name: Upload ci test log
if: ${{ success() || failure() }}
uses: actions/upload-artifact@v3
with:
name: ci_test_log
path: ci_${{ matrix.python-version }}_test_log.log
- name: Upload code coverage to Codecov
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
flags: unittests
env_vars: RUNNER_OS,PYTHON_VERSION
name: codecov-umbrella
fail_ci_if_error: false