Skip to content

[pre-commit.ci] pre-commit autoupdate #918

[pre-commit.ci] pre-commit autoupdate

[pre-commit.ci] pre-commit autoupdate #918

Workflow file for this run

name: Pydra
on:
push:
branches:
- master
pull_request:
defaults:
run:
shell: bash
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: 3
- run: pip install --upgrade build twine
- run: python -m build
- run: twine check dist/*
- uses: actions/upload-artifact@v3
with:
name: dist
path: dist/
- name: Build archive
run: |
git clean -fxd
mkdir archive
git archive -o archive/pydra.zip HEAD
- uses: actions/upload-artifact@v3
with:
name: archive
path: archive/
test:
needs: ['build']
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
python-version: ['3.8', '3.9', '3.10', '3.11']
install: ['wheel']
include:
- os: 'ubuntu-latest'
python-version: '3.11'
install: 'sdist'
- os: 'ubuntu-latest'
python-version: '3.11'
install: 'repo'
- os: 'ubuntu-latest'
python-version: '3.11'
install: 'archive'
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- name: Fetch sdist/wheel
uses: actions/download-artifact@v3
if: matrix.install == 'sdist' || matrix.install == 'wheel'
with:
name: dist
path: dist/
- name: Fetch git archive
uses: actions/download-artifact@v3
if: matrix.install == 'archive'
with:
name: archive
path: archive/
- name: Fetch repository
uses: actions/checkout@v3
if: matrix.install == 'repo'
- name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Update pip
run: python -m pip install --upgrade pip
- name: Determine installation target
run: |
if [[ "$INSTALL" = "sdist" ]]; then
echo "ARCHIVE=$( ls dist/*.tar.gz )" >> $GITHUB_ENV
elif [[ "$INSTALL" = "wheel" ]]; then
echo "ARCHIVE=$( ls dist/*.whl )" >> $GITHUB_ENV
elif [[ "$INSTALL" = "archive" ]]; then
echo "ARCHIVE=$( ls archive/*.zip )" >> $GITHUB_ENV
elif [[ "$INSTALL" = "repo" ]]; then
echo "ARCHIVE=." >> $GITHUB_ENV
fi
env:
INSTALL: ${{ matrix.install }}
- name: Install Pydra
run: pip install $ARCHIVE
- name: Print version
run: python -c "import pydra; print(pydra.__version__)"
- name: Install Pydra tests dependencies
run: pip install pydra[test]
- name: Disable etelemetry
run: echo "NO_ET=TRUE" >> $GITHUB_ENV
- name: Pytest
run: |
pytest -vs -n auto --doctest-modules --pyargs pydra \
--cov pydra --cov-config .coveragerc --cov-report xml:cov.xml
- name: Upload to codecov
run: codecov -f cov.xml -F unittests -e GITHUB_WORKFLOW