Skip to content

Bump gradle plugin version #25

Bump gradle plugin version

Bump gradle plugin version #25

name: Nextflow Plugin & Python Package CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
env:
NXF_OFFLINE: 'true'
steps:
- uses: actions/checkout@v4
- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- uses: conda-incubator/setup-miniconda@v2
with:
miniconda-version: latest
- name: Install Nextflow
run: |
wget -qO- https://get.nextflow.io | bash
sudo mv nextflow /usr/local/bin/
nextflow -version
- name: Install Python build dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Test versions
run: |
# Get plugin version from build.gradle
PLUGIN_VERSION=$(grep '^version =' build.gradle | cut -d'=' -f2 | tr -d " '")
# Get python package version from py/pyproject.toml
PYTHON_VERSION=$(grep 'version =' py/pyproject.toml | cut -d'=' -f2 | tr -d ' "')
if [ "$PLUGIN_VERSION" != "$PYTHON_VERSION" ]; then
echo "Plugin version mismatch: ${PYTHON_VERSION@Q}, ${PLUGIN_VERSION@Q}"
exit 1
fi
echo "PLUGIN_VERSION=$PLUGIN_VERSION" >> $GITHUB_ENV
- name: Build Nextflow plugin
run: make assemble
- name: Move plugin to ~/.nextflow/plugins
run: |
mkdir -p ~/.nextflow/plugins
unzip build/distributions/nf-python-${{ env.PLUGIN_VERSION }}.zip -d ~/.nextflow/plugins/nf-python-${{ env.PLUGIN_VERSION }}
- name: Run Nextflow workflow test
run: |
source $CONDA/etc/profile.d/conda.sh
pushd test/test-datatypes
nextflow run test_flow.nf -plugins "nf-python@${{ env.PLUGIN_VERSION }}"
popd
pushd test/test-conda
nextflow run test_conda_config.nf -plugins "nf-python@${{ env.PLUGIN_VERSION }}" -config conda.config
nextflow run test_conda_inline.nf -plugins "nf-python@${{ env.PLUGIN_VERSION }}"
popd
pushd test/test-executable
nextflow run test_executable_config.nf -plugins "nf-python@${{ env.PLUGIN_VERSION }}" -config executable.config
nextflow run test_executable_inline.nf -plugins "nf-python@${{ env.PLUGIN_VERSION }}"
popd