Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update GitHub actions #122

Merged
merged 7 commits into from
May 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Installs the Python dependencies, installs Crappy, and checks that it imports
name: Python Package
name: Test Python Package

on:
# Runs on pull requests targeting the default branch
# Runs on pull requests targeting the default branches
pull_request:
types: [opened, edited, reopened, synchronize]
branches: ["master", "develop"]
Expand All @@ -15,24 +15,35 @@ on:
- cron: '0 12 1 * *'

jobs:
build:
test-python-package:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
# Run on all the supported Python versions
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
# Run on all the supported platforms
os: [ubuntu-latest, windows-latest, macos-latest]
# Cannot run for Python 3.7 on macOS as it is no longer supported
exclude:
- os: macos-latest
python-version: 3.7

steps:
# Checkout the repository
- name: Checkout
uses: actions/checkout@v4
# Set up the correct version of Python
- name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
# Install the build dependencies
- name: Install dependencies
run: python -m pip install --upgrade pip wheel build setuptools
# Install the crappy Python module
- name: Install Crappy
run: python -m pip install .
# Check if the module imports as expected
- name: Import Crappy
run: python -c "import crappy; print(crappy.__version__)"
Loading