-
Notifications
You must be signed in to change notification settings - Fork 145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add scatter CI #350
Add scatter CI #350
Conversation
|
7fdbeae
to
032c36b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's go and if we encounter any issues i'm sure we can deal with them
Pull Request is not mergeable
Sounds good, once I get the tests passing in this PR at least 😆 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nf-test list is nice but running an entire job to find the *.test
files feels very wasteful.
- name: Cache Nextflow installation | ||
id: cache-software | ||
uses: actions/cache@v3 | ||
with: | ||
path: test-datasets/ | ||
key: ${{ steps.hash_workspace.outputs.digest }} | ||
|
||
- name: Check out test data | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: nf-core/test-datasets | ||
ref: methylseq | ||
path: test-datasets/ | ||
|
||
- name: Replace remote paths in samplesheets | ||
run: | | ||
for f in ./test-datasets/samplesheet/*csv; do | ||
sed -i 's=https://github.com/nf-core/test-datasets/raw/methylseq/=./test-datasets/=g' $f | ||
sed -i 's=https://raw.githubusercontent.com/nf-core/test-datasets/methylseq/=./test-datasets/=g' $f | ||
echo "========== $f ============" | ||
cat $f | ||
echo "========================================" | ||
done; | ||
path: | | ||
/usr/local/bin/nf-test | ||
/home/runner/.nf-test/nf-test.jar | ||
key: methylseq-${{ runner.os }}-${{ matrix.NXF_VER }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add Nextflow to this cache as well.
- name: Setup Nextflow | ||
uses: nf-core/setup-nextflow@v1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're going to hit the API limits again, I think we should add Nextflow to the software cache (see other comment).
- name: List nf-test | ||
id: list | ||
run: | | ||
echo "tests=$(nf-test list --silent --format=json)" >> "$GITHUB_OUTPUT" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't know about this...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you run this at dev time instead of in the action? It seems wasteful to create an entire job that runs this every single time when it only changes when you run the test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could create an nf-test pre-commit...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's an option. But how is this worse than checking for changes in modules?
We'll also be adding the check for changes to this job as well to run only CI jobs on changed code.
- name: Run nf-test | ||
run: | | ||
nf-test test --tag ${{ matrix.test_tags }} --profile "test,${{ matrix.profile }}" --junitxml=test.xml | ||
nf-test test \ | ||
--profile="test,${{ matrix.profile }}" \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm still tempted to group up conda, singularity and docker onto the same job to make things more efficient. Sure, they will run sequentially which will slow things down but we will reduce our load on GHA by 1/3rd. Food for thought, not necessary right now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's my arguement against that. I don't think efficiency is the only thing to optomize for here.
It's a developer tool, and I think that will confuse the pipeline developers and new contributors.
It's also the same amount of wall time, if you don't include the setup. I'd rather spend our time optimizing the setup and cacheing properly to cut down on that.
The other thing splitting up the jobs allow us to do is to fail fast. Instead of getting through docker and singularity and then condad failing a checksum, we then have to rerun all three, instead of just conda. So we end up using 3x the walltime anyways if the CI doesn't work perfectly the first time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't seem to have any check that could be used for branch protection?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch!
Co-authored-by: Adam Talbot <[email protected]>
Co-authored-by: Sateesh_Peri <[email protected]>
Again Co-authored-by: Sateesh_Peri <[email protected]>
Co-authored-by: sateeshperi <[email protected]>
9ccf62e
to
9d88d67
Compare
Uses a GitHub runner per test to significantly speed up CI times.
It does break the flaky index tests.