Skip to content

Commit

Permalink
Fix github actions (#58)
Browse files Browse the repository at this point in the history
* Update pre-commit action

Explicitly spell out what pre-commit should do, since it seems like maybe the
pre-commit action has been deprecated: https://github.com/pre-commit/action
points to https://pre-commit.ci/ and I'm not familiar with these .ci tools

* Force py3.11 for pre-commit action

Looks like something isn't compatible with 3.12

* Update blackdoc to force correct version of black

* Pin python version for build-doc tests

3.12 doesn't play nicely with FEISTY yet, forcing tests to use 3.11
  • Loading branch information
mnlevy1981 authored Oct 8, 2024
1 parent 871ddda commit fc6d76d
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 12 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ jobs:
fi
echo "PYTHON_VERSION=${{ matrix.python-version }}" >> $GITHUB_ENV
- name: Set up conda environment with micromamba
uses: mamba-org/setup-micromamba@main
uses: mamba-org/setup-micromamba@v2
with:
environment-file: ci/environment.yml
environment-name: dev-feisty
extra-specs: python=${{ matrix.python-version }}
create-args: python=${{ matrix.python-version }}

- name: Use old versions of packages where conda is out of sync with version support
run: |
Expand Down Expand Up @@ -79,18 +79,17 @@ jobs:
shell: bash -l {0}
strategy:
matrix:
os: [ubuntu-latest]
# python-version: [3.8]
os: ['ubuntu-latest']
steps:
- uses: actions/checkout@v2

# Install dependencies
- name: Set up conda environment with micromamba
uses: mamba-org/setup-micromamba@main
uses: mamba-org/setup-micromamba@v2
with:
environment-file: ci/environment.yml
environment-name: dev-feisty
extra-specs: python=${{ matrix.python-version }}
create-args: python=3.11

- name: Show conda environment
shell: bash -l {0}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ jobs:

# Install dependencies
- name: Set up conda environment with micromamba
uses: mamba-org/setup-micromamba@main
uses: mamba-org/setup-micromamba@v2
with:
environment-file: ci/environment.yml
environment-name: dev-feisty
extra-specs: python=${{ matrix.python-version }}
create-args: python=3.11

- name: Show conda environment
shell: bash -l {0}
Expand Down
17 changes: 14 additions & 3 deletions .github/workflows/linting.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,17 @@ jobs:
name: 'pre-commit hooks'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: pre-commit/action@v3.0.0
- uses: actions/checkout@v2
with:
fetch-depth: 0 # Fetch all history for all branches and tags.
- name: Set up conda environment with micromamba
uses: mamba-org/setup-micromamba@v2
with:
environment-file: ci/environment.yml
environment-name: dev-feisty
create-args: python=3.11

- name: Run pre-commit
shell: bash -l {0}
run: |
pre-commit run --all-files
4 changes: 3 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@ repos:
- id: black-jupyter

- repo: https://github.com/keewis/blackdoc
rev: v0.3.4
rev: v0.3.9
hooks:
- id: blackdoc
additional_dependencies: ['black==22.3.0']
- id: blackdoc-autoupdate-black

- repo: https://github.com/PyCQA/flake8
rev: 4.0.1
Expand Down

0 comments on commit fc6d76d

Please sign in to comment.