Skip to content

Commit

Permalink
Attempt to make GitHub actions complete
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesVarndell committed Jan 26, 2024
1 parent 80cc8f7 commit 7d6ec86
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 65 deletions.
116 changes: 58 additions & 58 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,65 +61,65 @@ jobs:
run: |
make unit-tests
type-check:
needs: [unit-tests]
if: ${{ !github.event.pull_request.head.repo.fork && github.event.action != 'labeled' || github.event.label.name == 'approved-for-ci' }}
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}

steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha || github.ref }}
- name: Install Conda environment with Micromamba
uses: mamba-org/provision-with-micromamba@v12
with:
environment-file: environment.yml
environment-name: DEVELOP
channels: conda-forge
cache-env: true
cache-env-key: ubuntu-latest-3.10
extra-specs: |
python=3.10
- name: Install package
run: |
python -m pip install --no-deps -e .
- name: Run code quality checks
run: |
echo type-check not used
# type-check:
# needs: [unit-tests]
# if: ${{ !github.event.pull_request.head.repo.fork && github.event.action != 'labeled' || github.event.label.name == 'approved-for-ci' }}
# runs-on: ubuntu-latest
# defaults:
# run:
# shell: bash -l {0}

documentation:
needs: [unit-tests]
if: ${{ !github.event.pull_request.head.repo.fork && github.event.action != 'labeled' || github.event.label.name == 'approved-for-ci' }}
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
# steps:
# - uses: actions/checkout@v3
# with:
# ref: ${{ github.event.pull_request.head.sha || github.ref }}
# - name: Install Conda environment with Micromamba
# uses: mamba-org/provision-with-micromamba@v12
# with:
# environment-file: environment.yml
# environment-name: DEVELOP
# channels: conda-forge
# cache-env: true
# cache-env-key: ubuntu-latest-3.10
# extra-specs: |
# python=3.10
# - name: Install package
# run: |
# python -m pip install --no-deps -e .
# - name: Run code quality checks
# run: |
# echo type-check not used

# documentation:
# needs: [unit-tests]
# if: ${{ !github.event.pull_request.head.repo.fork && github.event.action != 'labeled' || github.event.label.name == 'approved-for-ci' }}
# runs-on: ubuntu-latest
# defaults:
# run:
# shell: bash -l {0}

steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha || github.ref }}
- name: Install Conda environment with Micromamba
uses: mamba-org/provision-with-micromamba@v12
with:
environment-file: environment.yml
environment-name: DEVELOP
channels: conda-forge
cache-env: true
cache-env-key: ubuntu-latest-3.10
extra-specs: |
python=3.10
- name: Install package
run: |
conda install pandoc
python -m pip install --no-deps -e .
python -m pip install -r docs/requirements.txt
- name: Build documentation
run: |
make docs-build
# steps:
# - uses: actions/checkout@v3
# with:
# ref: ${{ github.event.pull_request.head.sha || github.ref }}
# - name: Install Conda environment with Micromamba
# uses: mamba-org/provision-with-micromamba@v12
# with:
# environment-file: environment.yml
# environment-name: DEVELOP
# channels: conda-forge
# cache-env: true
# cache-env-key: ubuntu-latest-3.10
# extra-specs: |
# python=3.10
# - name: Install package
# run: |
# conda install pandoc
# python -m pip install --no-deps -e .
# python -m pip install -r docs/requirements.txt
# - name: Build documentation
# run: |
# make docs-build

integration-tests:
needs: [unit-tests]
Expand Down Expand Up @@ -157,7 +157,7 @@ jobs:
make unit-tests
distribution:
needs: [integration-tests, type-check]
needs: [integration-tests]
if: ${{ !github.event.pull_request.head.repo.fork && github.event.action != 'labeled' || github.event.label.name == 'approved-for-ci' }}
runs-on: ubuntu-latest

Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -127,3 +127,5 @@ dmypy.json

# Pyre type checker
.pyre/

earthkit/plots/version.py
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ setup:
qa:
pre-commit run --all-files

# unit-tests:
# python -m pytest -vv -m 'not notebook' --cov=. --cov-report=$(COV_REPORT)
unit-tests:
python -m pytest -vv -m 'not notebook' --cov=. --cov-report=$(COV_REPORT)
# python -m pytest -v -m "notebook"

# type-check:
Expand All @@ -27,12 +27,12 @@ docker-build:
docker-run:
docker run --rm -ti -v $(PWD):/srv $(PROJECT)

# template-update:
# pre-commit run --all-files cruft -c .pre-commit-config-cruft.yaml
template-update:
pre-commit run --all-files cruft -c .pre-commit-config-cruft.yaml

# docs-build:
# cd docs && rm -fr _api && make clean && make html
docs-build:
cd docs && rm -fr _api && make clean && make html

#integration-tests:
# integration-tests:
# python -m pytest -vv --cov=. --cov-report=$(COV_REPORT) tests/integration*.py
# python -m pytest -vv --doctest-glob='*.md'
5 changes: 5 additions & 0 deletions tests/test_version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import earthkit.plots


def test_version() -> None:
assert earthkit.plots.__version__ != "999"

0 comments on commit 7d6ec86

Please sign in to comment.