Skip to content

List content of directory in the CI step. #26

List content of directory in the CI step.

List content of directory in the CI step. #26

Workflow file for this run

name: Python package
on: [push, pull_request]
jobs:
code-qc:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Lint with flake8
run: |
python -m pip install flake8
flake8 src/
build-sdist:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Set up R ${{ matrix.r-version }}
uses: r-lib/actions/setup-r@v2
with:
r-version: release
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install setuptools build
- name: Build sdist
run: |
python -m build -o dist/ --sdist .
- name: Upload source package.
uses: actions/upload-artifact@v4
with:
name: mashing-pumpkins-sdist
path: dist/mashing_pumpkins-*.tar.gz
build-wheel-posix:
runs-on: ${{ matrix.os }}
permissions:
packages: read
continue-on-error: true
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
python: 39
platform_id: manylinux2014
- os: macos-14
python: 310
platform_id: macosx_x86_64
steps:
- uses: actions/checkout@v4
- name: Set up QEMU
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v3
with:
platforms: all
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_SKIP: cp36-* cp37-* cp38-* pp*
CIBW_ARCHS_LINUX: "auto aarch64"
CIBW_ARCHS_MACOS: "x86_64 arm64 universal2"
CIBW_BUILD_VERBOSITY: 1
with:
output-dir: wheelhouse
config-file: pyproject.toml
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
path: wheelhouse/*.whl
test:
needs: [build-sdist]
runs-on: ${{ matrix.os }}
continue-on-error: false
strategy:
max-parallel: 4
matrix:
python-version: [3.9, "3.10", "3.11", "3.12"]
r-version: ['release']
os: [ubuntu-latest, ubuntu-22.04, macOS-latest]
venv_activate: ["source pyenv_base/bin/activate"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Create base virtualenv (non-windows)
run: |
python -m venv pyenv_base
${{ matrix.venv_activate }}
python -m pip install -U pip wheel
- uses: actions/[email protected]
with:
pattern: mashing-pumpkins-sdist
path: dist/
- name: Source package path.
shell: bash
run: |
ls .
ls dist/
echo "SRC_DIST=$(ls -1 dist/*.tar.gz | tail -n 1)" >> $GITHUB_ENV
- name: Test
run: |
${{ matrix.venv_activate }}
python -m pip install "${SRC_DIST}"'[test_minimal]'
pytest src/tests/