-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Update CI to barebone python [all tests ci] (#1192)
* ci: Add installed packages listing * ci: Add pip listing * ci: Remove conda from PR action * ci: Update worklows and add P2Z skip * ci: More cleanup to workflow * ci: Bump actions/setup-python from 4.7.0 to 4.7.1
- Loading branch information
Showing
3 changed files
with
25 additions
and
53 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,25 +9,20 @@ on: | |
workflow_dispatch: | ||
|
||
env: | ||
CONDA_ENV: echopype | ||
NUM_WORKERS: 2 | ||
|
||
jobs: | ||
test: | ||
name: ${{ matrix.python-version }}-build | ||
runs-on: ubuntu-20.04 | ||
runs-on: ubuntu-latest | ||
if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }} | ||
continue-on-error: ${{ matrix.experimental }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.9", "3.10"] # TODO: add back 3.11 once parsed2zarr is fixed | ||
python-version: ["3.9", "3.10", "3.11"] | ||
runs-on: [ubuntu-latest] | ||
experimental: [false] | ||
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: | ||
|
@@ -46,30 +41,20 @@ jobs: | |
- name: Set environment variables | ||
run: | | ||
echo "PYTHON_VERSION=${{ matrix.python-version }}" >> $GITHUB_ENV | ||
- name: Setup micromamba | ||
uses: mamba-org/setup-micromamba@v1 | ||
- name: Set up Python | ||
uses: actions/setup-[email protected] | ||
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 | ||
python-version: ${{ matrix.python-version }} | ||
- name: Upgrade pip | ||
run: python -m pip install --upgrade pip | ||
- 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 | ||
run: python -m pip install -r requirements-dev.txt | ||
- name: Install echopype | ||
shell: bash -l {0} | ||
run: | | ||
python -m pip install -e .[plot] | ||
run: python -m pip install -e ".[plot]" | ||
- name: Print installed packages | ||
run: python -m pip list | ||
- name: Copying test data to services | ||
shell: bash -l {0} | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,6 @@ on: | |
paths-ignore: ["**/docker.yaml", "docs"] | ||
|
||
env: | ||
CONDA_ENV: echopype | ||
NUM_WORKERS: 2 | ||
|
||
jobs: | ||
|
@@ -17,16 +16,9 @@ jobs: | |
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.9", "3.10"] # TODO: add back 3.11 once parsed2zarr is fixed | ||
python-version: ["3.9", "3.10", "3.11"] | ||
runs-on: [ubuntu-latest] | ||
experimental: [false] | ||
include: | ||
- runs-on: ubuntu-latest | ||
python-version: "3.11" | ||
experimental: true | ||
defaults: | ||
run: | ||
shell: bash -l {0} | ||
services: | ||
# TODO: figure out how to update tag when there's a new one | ||
minio: | ||
|
@@ -42,35 +34,28 @@ jobs: | |
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 # Fetch all history for all branches and tags. | ||
- name: Set up Python | ||
uses: actions/[email protected] | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Upgrade pip | ||
run: python -m pip install --upgrade pip | ||
- 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 | ||
run: | | ||
micromamba info | ||
micromamba list | ||
- name: Remove docker-compose python | ||
if: ${{ matrix.python-version == '3.10' || matrix.python-version == '3.11' }} | ||
run: sed -i "/docker-compose/d" requirements-dev.txt | ||
- name: Install dev tools | ||
run: | | ||
micromamba install -c conda-forge -n ${{ env.CONDA_ENV }} --yes --file requirements-dev.txt | ||
run: python -m pip install -r requirements-dev.txt | ||
# We only want to install this on one run, because otherwise we'll have | ||
# duplicate annotations. | ||
- name: Install error reporter | ||
if: ${{ matrix.python-version == '3.9' }} | ||
run: | | ||
python -m pip install pytest-github-actions-annotate-failures | ||
run: python -m pip install pytest-github-actions-annotate-failures | ||
- name: Install echopype | ||
run: | | ||
python -m pip install -e .[plot] | ||
run: python -m pip install -e ".[plot]" | ||
- name: Print installed packages | ||
run: python -m pip list | ||
- name: Copying test data to services | ||
run: | | ||
python .ci_helpers/docker/setup-services.py --deploy --data-only --http-server ${{ job.services.httpserver.id }} | ||
|
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