Skip to content

Commit

Permalink
update GHAs, clean up yml, use micromamba
Browse files Browse the repository at this point in the history
  • Loading branch information
ocefpaf committed May 25, 2022
1 parent 339132d commit e168f4a
Show file tree
Hide file tree
Showing 6 changed files with 80 additions and 93 deletions.
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
25 changes: 12 additions & 13 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,37 +3,36 @@ name: Integration 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 }}
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 compliance_checker

0 comments on commit e168f4a

Please sign in to comment.