Skip to content

Commit

Permalink
Update yml files
Browse files Browse the repository at this point in the history
  • Loading branch information
giswqs committed Jan 12, 2024
1 parent 2bd9353 commit 44c718f
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 14 deletions.
1 change: 1 addition & 0 deletions cookiecutter.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@
"Not open source"
],
"github_default_branch": ["main", "master"],
"python_version": "3.11",
"_copy_without_render": ["docs/overrides/main.html"]
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
pull_request:
branches:
- {{cookiecutter.github_default_branch}}
{% raw %}

jobs:
deploy:
runs-on: ubuntu-latest
Expand All @@ -13,7 +13,8 @@ jobs:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: "3.11"
python-version: "{{cookiecutter.python_version}}"

- name: Install GDAL
run: |
python -m pip install --upgrade pip
Expand All @@ -28,7 +29,7 @@ jobs:
pip install -r requirements.txt -r requirements_dev.txt -r requirements_docs.txt
pip install .
- name: Discover typos with codespell
run: codespell --skip="*.csv,*.geojson,*.json,*.js,*.html,*cff,*.pdf,./.git" --ignore-words-list="aci,acount,acounts,fallow,hart,hist,nd,ned,ois,wqs"
run: codespell --skip="*.csv,*.geojson,*.json,*.js,*.html,*cff,*.pdf,./.git" --ignore-words-list="aci,acount,hist"
- name: PKG-TEST
run: |
python -m unittest discover tests/
Expand All @@ -39,7 +40,8 @@ jobs:
# uses: nwtgck/actions-netlify@v2.0
# with:
# publish-dir: "./site"
# production-branch: main
# production-branch: {{cookiecutter.github_default_branch}}
{% raw %}
# github-token: ${{ secrets.GITHUB_TOKEN }}
# deploy-message: "Deploy from GitHub Actions"
# enable-pull-request-comment: true
Expand Down
8 changes: 5 additions & 3 deletions {{cookiecutter.github_repo_name}}/.github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@ name: docs
on:
push:
branches:
- {{cookiecutter.github_default_branch}}
- {{ cookiecutter.github_default_branch }}
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.11"
python-version: "{{cookiecutter.python_version}}"
{% raw %}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand All @@ -20,9 +21,10 @@ jobs:
- name: Discover typos with codespell
run: |
pip install codespell
codespell --skip="*.csv,*.geojson,*.json,*.js,*.html,*cff,./.git" --ignore-words-list="aci,acount,acounts,fallow,hart,hist,nd,ned,ois,wqs,watermask"
codespell --skip="*.csv,*.geojson,*.json,*.js,*.html,*cff,./.git" --ignore-words-list="aci,hist"
- name: PKG-TEST
run: |
python -m unittest discover tests/
- run: pip install -r requirements_docs.txt
- run: mkdocs gh-deploy --force
{% endraw %}
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,16 @@ on:
branches:
- {{cookiecutter.github_default_branch}}

{% raw %}

name: Linux installation
jobs:
test-ubuntu:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.11"]
python-version: ["{{cookiecutter.python_version}}"]
{% raw %}
steps:
- uses: actions/checkout@v3
- name: Set up Python
Expand All @@ -24,5 +25,5 @@ jobs:
- name: Install package
run: pip install .
- name: Test import
run: python -c "import leafmap; print('leafmap import successful')"
run: python -c "import numpy; print('numpy import successful')"
{% endraw %}
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@ jobs:
test-macOS:
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }} (${{ matrix.python-version}})
{% endraw %}
strategy:
fail-fast: false
matrix:
os: ["macOS-latest"]
python-version: ["3.11"]
python-version: ["{{cookiecutter.python_version}}"]
{% raw %}
steps:
- name: Checkout code
uses: actions/checkout@v3
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
on:
push:
branches:
- {{cookiecutter.github_default_branch}}
- {{ cookiecutter.github_default_branch }}
pull_request:
branches:
- {{cookiecutter.github_default_branch}}
- {{ cookiecutter.github_default_branch }}

name: Windows build
jobs:
Expand All @@ -16,7 +16,8 @@ jobs:
uses: conda-incubator/setup-miniconda@v2
with:
auto-activate-base: true
python-version: "3.11"
python-version: "{{cookiecutter.python_version}}"
{% raw %}
- name: Install GDAL
run: conda install -c conda-forge gdal --yes
- name: Test GDAL installation
Expand All @@ -29,3 +30,4 @@ jobs:
pip install --no-cache-dir Cython
pip install -r requirements.txt
pip install .
{% endraw %}

0 comments on commit 44c718f

Please sign in to comment.