Skip to content

Fix CI

Fix CI #20

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 plugins/nf-python/src/resources/META-INF/MANIFEST.MF
PLUGIN_VERSION=$(grep 'Plugin-Version' plugins/nf-python/src/resources/META-INF/MANIFEST.MF | cut -d' ' -f2)
# 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, $PLUGIN_VERSION"
exit 1
fi
echo "PLUGIN_VERSION=$PLUGIN_VERSION" >> $GITHUB_ENV
- name: Build Nextflow plugin
run: make buildPlugins
- name: Move plugin to ~/.nextflow/plugins
run: |
mkdir -p ~/.nextflow/plugins
cp -r build/plugins/nf-python-${{ env.PLUGIN_VERSION }} ~/.nextflow/plugins/
- 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