From 94bdc6212385edd65002a214f803e768ee54db65 Mon Sep 17 00:00:00 2001 From: Gregor Sturm Date: Tue, 23 Feb 2021 14:06:52 +0100 Subject: [PATCH 1/2] Only use one thread for pytest-workflow This avoids a race condition on the conda cache. --- .github/PULL_REQUEST_TEMPLATE.md | 6 +++--- .github/workflows/pytest-workflow.yml | 3 ++- README.md | 6 +++--- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 41367bf7..4840a93d 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -25,6 +25,6 @@ Learn more about contributing: [CONTRIBUTING.md](https://github.com/nf-core/modu - [ ] Add a resource `label` - [ ] Use BioConda and BioContainers if possible to fulfil software requirements. - Ensure that the test works with either Docker / Singularity. Conda CI tests can be quite flaky: - - [ ] `PROFILE=docker pytest --tag --symlink --wt 2 --keep-workflow-wd` - - [ ] `PROFILE=singularity pytest --tag --symlink --wt 2 --keep-workflow-wd` - - [ ] `PROFILE=conda pytest --tag --symlink --wt 2 --keep-workflow-wd` + - [ ] `PROFILE=docker pytest --tag --symlink --keep-workflow-wd` + - [ ] `PROFILE=singularity pytest --tag --symlink --keep-workflow-wd` + - [ ] `PROFILE=conda pytest --tag --symlink --keep-workflow-wd` diff --git a/.github/workflows/pytest-workflow.yml b/.github/workflows/pytest-workflow.yml index 7878b8e3..40ec97ae 100644 --- a/.github/workflows/pytest-workflow.yml +++ b/.github/workflows/pytest-workflow.yml @@ -80,7 +80,8 @@ jobs: # Test the module - name: Run pytest-workflow - run: TMPDIR=~ PROFILE=${{ matrix.profile }} pytest --tag ${{ matrix.tags }} --symlink --wt 2 --kwdof + # only use one thread for pytest-workflow to avoid race condition on conda cache. + run: TMPDIR=~ PROFILE=${{ matrix.profile }} pytest --tag ${{ matrix.tags }} --symlink --wt 1 --kwdof - name: Upload logs on failure if: failure() diff --git a/README.md b/README.md index bb89579f..121f38fe 100644 --- a/README.md +++ b/README.md @@ -275,21 +275,21 @@ In order to test that each module added to `nf-core/modules` is actually working ```console cd /path/to/git/clone/of/nf-core/modules/ - PROFILE=docker pytest --tag bowtie --symlink --wt 2 --keep-workflow-wd + PROFILE=docker pytest --tag bowtie --symlink --keep-workflow-wd ``` - Typical command with Singularity: ```console cd /path/to/git/clone/of/nf-core/modules/ - TMPDIR=~ PROFILE=singularity pytest --tag bowtie --symlink --wt 2 --keep-workflow-wd + TMPDIR=~ PROFILE=singularity pytest --tag bowtie --symlink --keep-workflow-wd ``` - Typical command with Conda: ```console cd /path/to/git/clone/of/nf-core/modules/ - PROFILE=conda pytest --tag bowtie --symlink --wt 2 --keep-workflow-wd + PROFILE=conda pytest --tag bowtie --symlink --keep-workflow-wd ``` - See [docs on running pytest-workflow](https://pytest-workflow.readthedocs.io/en/stable/#running-pytest-workflow) for more info. From 38349417ad3768980786bb9b2085535e78aff988 Mon Sep 17 00:00:00 2001 From: Gregor Sturm Date: Tue, 23 Feb 2021 14:14:29 +0100 Subject: [PATCH 2/2] Update .github/workflows/pytest-workflow.yml Co-authored-by: Harshil Patel --- .github/workflows/pytest-workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pytest-workflow.yml b/.github/workflows/pytest-workflow.yml index 40ec97ae..84cc8eb1 100644 --- a/.github/workflows/pytest-workflow.yml +++ b/.github/workflows/pytest-workflow.yml @@ -81,7 +81,7 @@ jobs: # Test the module - name: Run pytest-workflow # only use one thread for pytest-workflow to avoid race condition on conda cache. - run: TMPDIR=~ PROFILE=${{ matrix.profile }} pytest --tag ${{ matrix.tags }} --symlink --wt 1 --kwdof + run: TMPDIR=~ PROFILE=${{ matrix.profile }} pytest --tag ${{ matrix.tags }} --symlink --kwdof - name: Upload logs on failure if: failure()