Skip to content

Require NumPy 2.x and Python 3.9+ #269

Require NumPy 2.x and Python 3.9+

Require NumPy 2.x and Python 3.9+ #269

Workflow file for this run

# GitHub Actions tests for the climbing_ratings Python package.
# Copyright Contributors to the Climbing Ratings project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: climbing_ratings
on:
push:
paths:
- '**'
- '!.github/workflows/test-climbr.yml'
- '!climbr/**'
- '!**.R'
pull_request:
branches:
- 'main'
schedule:
# Weekly on Fridays at 03:28.
- cron: '28 3 * * 5'
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install dependencies
run: |
pip3 install Cython numpy pytest mypy setuptools
python3 setup.py develop
pip3 freeze --all
- name: Build and test
run: |
python3 setup.py build_ext --inplace
python3 -X dev -m pytest
- name: mypy
run: |
python3 -m mypy --strict -p climbing_ratings
python3 -m mypy --strict tests/test_climbing_ratings.py
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
- name: Install dependencies
run: |
pip3 install black cython-lint
- name: black
run: |
python3 -m black --check climbing_ratings setup.py tests/*.py
- name: cython-lint
run: |
cython-lint .