Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update GHAs, clean up yml, use micromamba #932

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 14 additions & 15 deletions .github/workflows/cc-checker-ugrid-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,41 +3,40 @@ name: UGRID Plugin Tests
on:
pull_request:
push:
branches: [master]
branches: [master,develop,main]

jobs:
run:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Setup Conda
uses: s-weigand/setup-conda@v1
- name: Setup Micromamba
uses: mamba-org/provision-with-micromamba@main
with:
activate-conda: false
conda-channels: conda-forge
environment-file: false

- name: Python ${{ matrix.python-version }}
- name: Python
shell: bash -l {0}
run: |
conda create --name TEST python=${{ matrix.python-version }} python=3 pip --file requirements.txt --file test_requirements.txt --strict-channel-priority
source activate TEST
micromamba create --name TEST python=3 pip --file requirements.txt --file test_requirements.txt --channel conda-forge
micromamba activate TEST
pip install -e . --no-deps --force-reinstall

- name: Conda Info
- name: micromamba Info
shell: bash -l {0}
run: |
source activate TEST
conda info --all
conda list
micromamba activate TEST
micromamba info --all
micromamba list

- name: cc-plugin-glider tests
shell: bash -l {0}
run: |
source activate TEST
micromamba activate TEST
git clone https://github.com/ioos/cc-checker-ugrid.git
cd cc-checker-ugrid
pip install -e . --no-deps --force-reinstall
conda install --file requirements.txt --file requirements-dev.txt ;
micromamba install --file requirements.txt --file requirements-dev.txt
pytest -s -rxs -v cc_plugin_ugrid
27 changes: 13 additions & 14 deletions .github/workflows/cc-plugin-glider-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,40 +3,39 @@ name: Glider Plugin Tests
on:
pull_request:
push:
branches: [master]
branches: [master,develop,main]

jobs:
run:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Setup Conda
uses: s-weigand/setup-conda@v1
- name: Setup Micromamba
uses: mamba-org/provision-with-micromamba@main
with:
activate-conda: false
conda-channels: conda-forge
environment-file: false

- name: Python ${{ matrix.python-version }}
- name: Python
shell: bash -l {0}
run: |
conda create --name TEST python=${{ matrix.python-version }} python=3 pip --file requirements.txt --file test_requirements.txt --strict-channel-priority
source activate TEST
micromamba create --name TEST python=3 pip --file requirements.txt --file test_requirements.txt --channel conda-forge
micromamba activate TEST
pip install -e . --no-deps --force-reinstall

- name: Conda Info
shell: bash -l {0}
run: |
source activate TEST
conda info --all
conda list
micromamba activate TEST
micromamba info --all
micromamba list

- name: cc-plugin-glider tests
shell: bash -l {0}
run: |
source activate TEST
micromamba activate TEST
git clone https://github.com/ioos/cc-plugin-glider.git
cd cc-plugin-glider
conda install --file requirements.txt --file requirements-dev.txt ;
micromamba install --file requirements.txt --file requirements-dev.txt
pytest -s -rxs -v cc_plugin_glider
29 changes: 14 additions & 15 deletions .github/workflows/cc-plugin-sgrid-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,40 +3,39 @@ name: SGRID Plugin Tests
on:
pull_request:
push:
branches: [master]
branches: [master,develop,main]

jobs:
run:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Setup Conda
uses: s-weigand/setup-conda@v1
- name: Setup Micromamba
uses: mamba-org/provision-with-micromamba@main
with:
activate-conda: false
conda-channels: conda-forge
environment-file: false

- name: Python ${{ matrix.python-version }}
- name: Python
shell: bash -l {0}
run: |
conda create --name TEST python=${{ matrix.python-version }} python=3 pip --file requirements.txt --file test_requirements.txt --strict-channel-priority
source activate TEST
micromamba create --name TEST python=3 pip --file requirements.txt --file test_requirements.txt --channel conda-forge
micromamba activate TEST
pip install -e . --no-deps --force-reinstall

- name: Conda Info
- name: micromamba Info
shell: bash -l {0}
run: |
source activate TEST
conda info --all
conda list
micromamba activate TEST
micromamba info --all
micromamba list

- name: cc-plugin-glider tests
shell: bash -l {0}
run: |
source activate TEST
micromamba activate TEST
git clone https://github.com/ioos/cc-plugin-sgrid.git
cd cc-plugin-sgrid
conda install --file requirements.txt --file requirements-dev.txt ;
micromamba install --file requirements.txt --file requirements-dev.txt
pytest -s -rxs -v cc_plugin_sgrid
38 changes: 15 additions & 23 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,53 +3,45 @@ name: Code coverage report
on:
pull_request:
push:
branches:
- master
- develop
branches: [master,develop,main]

jobs:
run:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ["3.10"]
os: [ubuntu-latest]
fail-fast: false
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Setup Conda
uses: s-weigand/setup-conda@v1
- name: Setup Micromamba
uses: mamba-org/provision-with-micromamba@main
with:
activate-conda: false
conda-channels: conda-forge
environment-file: false

- name: Python ${{ matrix.python-version }}
- name: Python
shell: bash -l {0}
run: |
conda create --name TEST python=${{ matrix.python-version }} pip --file requirements.txt --file test_requirements.txt --strict-channel-priority
source activate TEST
micromamba create --name TEST python=3 pip --file requirements.txt --file test_requirements.txt --channel conda-forge
micromamba activate TEST
pip install -e . --no-deps --force-reinstall

- name: Conda Info
- name: micromamba Info
shell: bash -l {0}
run: |
source activate TEST
conda info --all
conda list
micromamba activate TEST
micromamba info --all
micromamba list

- name: Run tests with coverage
shell: bash -l {0}
run: |
source activate TEST
micromamba activate TEST
pytest --cov=compliance_checker --cov-report=xml compliance_checker/tests
# pass this step even if there are individual test failures, we are
# interested in the overall level of coverage and other checks can
# report on test failures.
continue-on-error: true

- name: Upload to codecov
uses: codecov/codecov-action@v2
uses: codecov/codecov-action@v3
with:
files: coverage.xml
25 changes: 12 additions & 13 deletions .github/workflows/default-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Default Tests
on:
pull_request:
push:
branches: [master]
branches: [master,develop,main]

jobs:
run:
Expand All @@ -15,30 +15,29 @@ jobs:
fail-fast: false

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Setup Conda
uses: s-weigand/setup-conda@v1
- name: Setup Micromamba
uses: mamba-org/provision-with-micromamba@main
with:
activate-conda: false
conda-channels: conda-forge
environment-file: false

- name: Python ${{ matrix.python-version }}
shell: bash -l {0}
run: |
conda create --name TEST python=${{ matrix.python-version }} pip --file requirements.txt --file test_requirements.txt --strict-channel-priority
source activate TEST
micromamba create --name TEST python=${{ matrix.python-version }} pip --file requirements.txt --file test_requirements.txt --channel conda-forge
micromamba activate TEST
pip install -e . --no-deps --force-reinstall

- name: Conda Info
- name: micromamba Info
shell: bash -l {0}
run: |
source activate TEST
conda info --all
conda list
micromamba activate TEST
micromamba info --all
micromamba list

- name: Default Tests
shell: bash -l {0}
run: |
source activate TEST
micromamba activate TEST
pytest -s -rxs -v -k "not integration" compliance_checker
23 changes: 11 additions & 12 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,30 +10,29 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Setup Conda
uses: s-weigand/setup-conda@v1
- name: Setup Micromamba
uses: mamba-org/provision-with-micromamba@main
with:
activate-conda: false
conda-channels: conda-forge
environment-file: false

- name: Python ${{ matrix.python-version }}
shell: bash -l {0}
run: |
conda create --name TEST python=${{ matrix.python-version }} python=3 pip --file requirements.txt --file test_requirements.txt --strict-channel-priority
source activate TEST
micromamba create --name TEST python=${{ matrix.python-version }} python=3 pip --file requirements.txt --file test_requirements.txt --channel conda-forge
micromamba activate TEST
pip install -e . --no-deps --force-reinstall

- name: Conda Info
- name: micromamba Info
shell: bash -l {0}
run: |
source activate TEST
conda info --all
conda list
micromamba activate TEST
micromamba info --all
micromamba list

- name: Integration Tests
shell: bash -l {0}
run: |
source activate TEST
micromamba activate TEST
pytest -m "integration" -s -rxs -v --vcr-record=none compliance_checker