Skip to content

Merge pull request #226 from suurt8ll/feat/improved-contorl-over-stat… #287

Merge pull request #226 from suurt8ll/feat/improved-contorl-over-stat…

Merge pull request #226 from suurt8ll/feat/improved-contorl-over-stat… #287

Workflow file for this run

name: Python CI
on:
pull_request:
branches: [ master ]
types: [opened, synchronize, reopened]
push:
branches: [ master ]
jobs:
# This job checks if the specific file we care about has changed.
# It runs first and its output determines if the test jobs should run.
check-changes:
name: Check for gemini_manifold.py changes
runs-on: ubuntu-latest
# Outputs can be used by other jobs that depend on this one.
outputs:
# The output is named 'run_tests'. Its value is the 'any_changed' output from the 'changed-files' step.
# This will be 'true' if the file changed, and 'false' otherwise.
run_tests: ${{ steps.changed-files.outputs.any_changed }}
steps:
# We need to check out the code to inspect the git history.
- name: Checkout repository
uses: actions/checkout@v4
with:
# fetch-depth: 0 fetches the entire history. This is important for pull requests
# so the action can compare the HEAD of the PR with its base.
fetch-depth: 0
# This action determines if specified files have changed.
- name: Check for specific file changes
id: changed-files
uses: tj-actions/changed-files@v44
with:
# List the file(s) we want to monitor for changes.
files: |
plugins/pipes/gemini_manifold.py
# This job runs the tests, but only if the 'check-changes' job determined it's necessary.
run-tests:
# This job depends on the 'check-changes' job completing successfully.
needs: check-changes
# This 'if' condition checks the output from the 'check-changes' job.
# The entire 'run-tests' job (including all its matrix variations) will be skipped
# if the output 'run_tests' is not 'true'.
if: needs.check-changes.outputs.run_tests == 'true'
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ['3.11', '3.12', '3.13']
name: Test on ${{ matrix.os }} with Python ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run pytest
run: pytest