Skip to content

Commit

Permalink
Merge pull request #122 from LaboratoireMecaniqueLille/ci/update_gith…
Browse files Browse the repository at this point in the history
…ub_actions

Update GitHub actions
  • Loading branch information
WeisLeDocto authored May 2, 2024
2 parents 90ceb7a + f1a8e3a commit e61f568
Showing 1 changed file with 15 additions and 4 deletions.
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__)"

0 comments on commit e61f568

Please sign in to comment.