Skip to content

chore: Update pyproject and tests to support Mac's/arm local development #577

chore: Update pyproject and tests to support Mac's/arm local development

chore: Update pyproject and tests to support Mac's/arm local development #577

Workflow file for this run

# Contrinuous Integration for community modules
name: modules
on:
push:
branches: [ main ]
paths:
- "modules/**"
pull_request:
branches: [ main ]
paths:
- "modules/**"
jobs:
track-modules:
runs-on: ubuntu-22.04
steps:
- name: Checkout contents
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get changed files
id: changed-files
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3
with:
base: ${{ github.ref }}
list-files: 'json'
filters: |
modules:
- 'modules/**'
- name: Compute modules from files
id: compute-changes
run: |
modules=$(echo "${{ toJson(steps.changed-files.outputs.modules_files) }}" | jq '.[] | split("/") | nth(1)' | jq -s -c '. | unique')
echo "computed_modules=$modules"
echo "computed_modules=$modules" >> $GITHUB_OUTPUT
outputs:
changed_modules: ${{ steps.compute-changes.outputs.computed_modules }}
test:
runs-on: ubuntu-22.04
needs: [track-modules]
if: ${{ needs.track-modules.outputs.changed_modules != '[]' }}
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
module: ${{ fromJSON(needs.track-modules.outputs.changed_modules) }}
steps:
- name: Checkout contents
uses: actions/checkout@v4
- name: Set up Python
uses: ./.github/actions/setup-env
with:
python-version: ${{ matrix.python-version }}
- name: Install Python dependencies
run: poetry install -E ${{ matrix.module }}
- name: Run tests
run: make modules/${{ matrix.module }}/tests
- name: Run doctests
run: make modules/${{ matrix.module }}/doctests