diff --git a/.github/environment.yml b/.github/environment.yml index 570b1e9..d09ebd9 100644 --- a/.github/environment.yml +++ b/.github/environment.yml @@ -4,7 +4,6 @@ channels: - conda-forge dependencies: - - python==3.10 - pip - oommf - pytest diff --git a/.github/workflows/workflow.yml b/.github/workflows/test.yml similarity index 84% rename from .github/workflows/workflow.yml rename to .github/workflows/test.yml index 59beb8f..ffee077 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/test.yml @@ -1,7 +1,10 @@ -name: workflow +name: tests on: push: + branches: + - master + pull_request: schedule: - cron: '0 0 * * 1' # run every Monday workflow_dispatch: @@ -10,11 +13,11 @@ env: PYTEST_ADDOPTS: "--color=yes" jobs: - workflow: + tests: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-latest, macos-latest, windows-latest] + os: [ubuntu-latest, macos-26-intel, windows-latest] defaults: run: shell: bash -l {0} @@ -24,14 +27,12 @@ jobs: uses: actions/checkout@v2 - name: Set up conda - uses: conda-incubator/setup-miniconda@v2 + uses: conda-incubator/setup-miniconda@v3 with: + python-version: 3.13 auto-update-conda: true activate-environment: conda-environment environment-file: .github/environment.yml - miniforge-version: latest - miniforge-variant: Mambaforge - use-mamba: true # The first import (of discretisedfield) on Windows produces a failure in the notebook tests # (output mismatch) because of some (hidden) message on stderr (some IO error on Windows that diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 493580e..0d67cef 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,14 +2,14 @@ exclude: 'dev' repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v5.0.0 + rev: v6.0.0 hooks: - id: check-merge-conflict # checks for files that contain merge conflict strings - id: check-toml # checks toml files for parseable syntax - id: debug-statements # checks for debugger imports and py37+ `breakpoint()` calls in python source - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.12.0 + rev: v0.15.15 hooks: # Run the linter. - id: ruff @@ -17,8 +17,7 @@ repos: args: - --fix - --exit-non-zero-on-fix - - --per-file-ignores - - getting-started/python-basics.ipynb:E999 + exclude: getting-started/python-basics.ipynb # Run the formatter. - id: ruff-format