Skip to content

ENH: Add OpenSSF Scorecard action #2379

ENH: Add OpenSSF Scorecard action

ENH: Add OpenSSF Scorecard action #2379

Workflow file for this run

name: Python Wasm
on:
push:
branches:
- main
pull_request:
branches:
- main
env:
pyodide-version: 0.26.3
defaults:
run:
shell: bash -leo pipefail {0} {0}
jobs:
itkwasm-python:
runs-on: ${{ matrix.os }}
env:
python-version: ${{ format('3.{0}', matrix.python-minor-version) }}
strategy:
max-parallel: 5
matrix:
os: [ubuntu-22.04, windows-2022, macos-14]
python-minor-version: [11, 12]
package: [compress-stringify, compare-images, dicom, mesh-io, image-io, transform-io, downsample]
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: prefix-dev/[email protected]
- name: Set up Python ${{ env.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ env.python-version }}
- name: Free Disk Space (Ubuntu)
if: ${{ matrix.os == 'ubuntu-22.04' }}
uses: jlumbroso/free-disk-space@main
- uses: actions/setup-node@v4
with:
node-version: '22'
- name: Install
uses: pnpm/action-setup@v4
with:
run_install: true
- name: Build build:gen:python
if: ${{ matrix.os == 'ubuntu-22.04' }}
run: |
pnpm run --aggregate-output --filter "@itk-wasm/${{ matrix.package }}-build" build:wasi
- name: Build bindgen:python
if: ${{ matrix.os == 'ubuntu-22.04' }}
run: |
pnpm run --aggregate-output --filter "@itk-wasm/${{ matrix.package }}-build" bindgen:python
- name: Build build:python:wasi
if: ${{ matrix.os == 'ubuntu-22.04' }}
run: |
pnpm run --aggregate-output --filter "@itk-wasm/${{ matrix.package }}-build" build:python:wasi
- name: Test python on system
if: ${{ matrix.package != 'dicom' && matrix.os == 'ubuntu-22.04' || (matrix.package != 'mesh-io' && matrix.package != 'dicom' && matrix.package != 'image-io' && matrix.package != 'downsample' ) }}
run: |
pnpm run --aggregate-output --filter "@itk-wasm/${{ matrix.package }}-build" test:python:wasi
- uses: thewtex/pyodide-actions/install-browser@1e32e8a037a3e99a845dd7ebad6b057a40b7e2c0
if: ${{ matrix.python-minor-version > 11 && matrix.os == 'ubuntu-22.04' }}
with:
runner: selenium
browser: chrome
browser-version: latest
- name: Test python on chrome
if: ${{ matrix.python-minor-version > 11 && matrix.package != 'dicom' && matrix.os == 'ubuntu-22.04' }}
run: |
pnpm run --aggregate-output --filter "@itk-wasm/${{ matrix.package }}-build" test:python:emscripten