Skip to content

Reintroduce linting of docs/modules/*.md #2515

Reintroduce linting of docs/modules/*.md

Reintroduce linting of docs/modules/*.md #2515

Workflow file for this run

name: "MultiQC - Windows"
on:
push:
branches:
- master
paths-ignore:
- "docs/**"
- "*.md"
pull_request:
paths-ignore:
- "docs/**"
- "*.md"
jobs:
changes:
name: Check for changes
runs-on: ubuntu-latest
outputs:
files_changed: ${{ steps.filter.outputs.changes }}
n_files_changes: ${{ steps.filter.outputs.changes.all_files_count}}
modules: ${{ steps.filter.outputs.changes.modules }}
n_modules: ${{ steps.filter.outputs.changes.modules_count }}
base_module: ${{ steps.filter.outputs.changes.base_module }}
changelog: ${{ steps.filter.outputs.changes.changelog }}
steps:
- uses: actions/checkout@v3
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
modules:
- "multiqc/modules/**"
base_module:
- "multiqc/modules/base_module.py"
changelog:
- "CHANGELOG.md"
all_files:
- "**"
run_multiqc:
name: Windows - Python ${{ matrix.python-version }}
runs-on: windows-latest
needs: changes
strategy:
matrix:
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11"]
timeout-minutes: 10
steps:
# Check out MultiQC code
- uses: actions/checkout@v3
# Set up Windows with C++ for numpy
- name: Visual Studio Command Prompt tool
run: cmd "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" ${{ matrix.platform-vcvars }}
# Set up Python
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
# Update core packages
- name: Install dependencies for CI tests
run: |
python -m pip install --upgrade pip setuptools
# Install MultiQC
- name: Install MultiQC
run: pip install .
# Fetch the MultiQC test data
# NB: Download zip file instead of git clone, as Windows complains about reserved filenames and certain characters
- name: Download test data
run: |
curl -fsSL https:/ewels/MultiQC_TestData/archive/master.zip -o test_data.zip
7z x test_data.zip -y -o"test_data"
dir test_data\MultiQC_TestData-master
# Set the `-m` flag if only one module has changed
- name: "Get a `-m` flag for the `multiqc` if only one module has changed"
uses: haya14busa/action-cond@v1
id: single_module
with:
cond: ${{ ! needs.changes.outputs.base_module && needs.changes.outputs.n_modules == 1 && (needs.changes.outputs.n_files == 1 || needs.changes.outputs.n_files == 2 && needs.changes.outputs.changelog)}}
if_true: "-m ${{ needs.changes.outputs.modules[0] }}"
if_false: ""
# Run all of the tests! Remember the BACKslash path separator!
- name: Special case input data
run: multiqc ${{ steps.single_module.outputs.value }} test_data\MultiQC_TestData-master\data --ignore test_data\MultiQC_TestData-master\data\modules\
- name: All modules / Custom report filename
run: multiqc ${{ steps.single_module.outputs.value }} --lint test_data\MultiQC_TestData-master\data\modules\ --filename full_report.html
- name: File-list input of dirs
run: |
cd test_data\MultiQC_TestData-master
multiqc ${{ steps.single_module.outputs.value }} --file-list data\special_cases\dir_list.txt
- name: Specific module / Force overwrite / Prepend dirnames / Name and comment / No data dir
run: multiqc --lint test_data\MultiQC_TestData-master\data\modules\ -m fastqc -f -d -dd 1 -i "Forced Report" -b "This command has lots of options" --filename custom_fn --no-data-dir
- name: For overwrite / Flat plots / Tagged modules only / Exclude module / Ignore samples / Full names / zip data dir / config file
run: multiqc ${{ steps.single_module.outputs.value }} --lint test_data\MultiQC_TestData-master\data\modules\ -f --flat --tag methylation --exclude clusterflow --ignore-samples ngi --fullnames --zip-data-dir -c test\config_example.yaml
- name: Specfic module / named output dir / dev template / JSON data / File list
run: |
cd test_data\MultiQC_TestData-master
multiqc -m star -o testsmultiqc_report_dev -t default_dev -k json --file-list data\special_cases\file_list.txt