Skip to content

Commit fc6755c

Browse files
authored
Merge pull request #211 from ocefpaf/dependabot
add dependabot and update GHA
2 parents 855d2c7 + c16ca88 commit fc6755c

File tree

4 files changed

+32
-35
lines changed

4 files changed

+32
-35
lines changed

.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# See https://docs.github.com/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/keeping-your-actions-up-to-date-with-dependabot
2+
3+
version: 2
4+
updates:
5+
6+
- package-ecosystem: "github-actions"
7+
directory: "/"
8+
schedule:
9+
interval: "daily"
10+
labels:
11+
- "Bot"

.github/workflows/deploy-docs.yml

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@ name: Build and Deploy docs
22

33
on:
44
pull_request:
5-
65
push:
7-
tags:
8-
- "v*"
6+
branches:
7+
- main
8+
release:
9+
types:
10+
- published
911

1012
jobs:
1113
build-docs:
@@ -24,14 +26,10 @@ jobs:
2426

2527
- name: Build environment
2628
shell: bash -l {0}
27-
run: |
29+
run: >
2830
micromamba create --name TEST python=3 --file requirements.txt --file requirements-dev.txt --channel conda-forge
29-
micromamba activate TEST
30-
python -m pip install -e . --no-deps --force-reinstall
31-
32-
- name: Get the version
33-
id: get_version
34-
run: echo ::set-output name=VERSION::$(python setup.py --version)
31+
&& micromamba activate TEST
32+
&& python -m pip install -e . --no-deps --force-reinstall
3533
3634
- name: Build documentation
3735
shell: bash -l {0}
@@ -45,7 +43,7 @@ jobs:
4543
popd
4644
4745
- name: Deploy
48-
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
46+
if: github.event_name == 'release' || github.event_name == 'push'
4947
uses: peaceiris/[email protected]
5048
with:
5149
github_token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/pypi.yml

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
name: Publish to PyPI
22

3-
on:
4-
pull_request:
3+
on: ["push", "pull_request"]
54

6-
push:
7-
tags:
8-
- "v*"
5+
defaults:
6+
run:
7+
shell: bash
98

109
jobs:
1110
packages:
@@ -20,31 +19,26 @@ jobs:
2019

2120
- name: Get tags
2221
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
23-
shell: bash
2422

2523
- name: Install build tools
2624
run: |
2725
python -m pip install --upgrade pip wheel setuptools setuptools_scm build twine check-manifest
2826
29-
shell: bash
30-
3127
- name: Build binary wheel
3228
run: python -m build --sdist --wheel . --outdir dist
3329

3430
- name: CheckFiles
35-
run: |
31+
run: >
3632
check-manifest
37-
ls dist
38-
shell: bash
33+
&& ls dist
3934
4035
- name: Test wheels
4136
run: |
4237
cd dist && python -m pip install windrose*.whl
4338
python -m twine check *
44-
shell: bash
4539
4640
- name: Publish a Python distribution to PyPI
47-
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
41+
if: ${{ github.event_name == 'release' }}
4842
uses: pypa/[email protected]
4943
with:
5044
user: __token__

.github/workflows/tests.yml

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ name: Tests
33
on:
44
pull_request:
55
push:
6-
branches: [master, main]
6+
branches: [main]
77

88
jobs:
99
run:
1010
runs-on: ${{ matrix.os }}
1111
strategy:
1212
matrix:
13-
python-version: ["3.8", "3.9", "3.10"]
13+
python-version: ["3.8", "3.9", "3.10", "3.11"]
1414
os: [windows-latest, ubuntu-latest, macos-latest]
1515
fail-fast: false
1616

@@ -24,16 +24,10 @@ jobs:
2424

2525
- name: Python ${{ matrix.python-version }}
2626
shell: bash -l {0}
27-
run: |
27+
run: >
2828
micromamba create --name TEST python=${{ matrix.python-version }} --file requirements.txt --file requirements-dev.txt --channel conda-forge
29-
micromamba activate TEST
30-
python -m pip install -e . --no-deps --force-reinstall
31-
32-
- name: Debug Installation
33-
shell: bash -l {0}
34-
run: |
35-
micromamba activate TEST
36-
which python
29+
&& micromamba activate TEST
30+
&& python -m pip install -e . --no-deps --force-reinstall
3731
3832
- name: Tests
3933
shell: bash -l {0}

0 commit comments

Comments
 (0)