Skip to content
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

Move Changes action locally #7223

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/actions/detect-nf-test-changes/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*
!Dockerfile
!entrypoint.py
!entrypoint.sh
!requirements.txt
17 changes: 17 additions & 0 deletions .github/actions/detect-nf-test-changes/.github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "docker"
directory: "/"
target-branch: "main"
schedule:
interval: "daily"
- package-ecosystem: "github-actions"
directory: "/"
target-branch: "main"
schedule:
interval: "daily"
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Includes a bunch of import or setup statements to try and trigger a false positive
include { SUBWORKFLOW_A } from './subworkflows/a/main.nf'
include { SUBWORKFLOW_A } from '../subworkflows/a/main.nf'
process "PROCESS_A"
setup {
run("PROCESS_A") {
script "../../a/main.nf"
process {
"""
"""
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
".":
- ./.github/workflows/**
- ./nf-test.config
- ./nextflow.config
tests:
- ./assets/*
- ./bin/*
- ./conf/*
- ./main.nf
- ./nextflow_schema.json

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
include { SUBWORKFLOW_A } from './subworkflows/a/main.nf'

workflow {
// Fake
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
process PROCESS_A {
// No change
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
nextflow_process {

name "Test process A"
script "../main.nf"
process "PROCESS_A"

test("mytest") {
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
process PROCESS_B {
// Fake process
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
nextflow_process {

name "Test process B"
script "../main.nf"
process "PROCESS_B"

setup {
run("PROCESS_A") {
script "../../a/main.nf"
process {
"""
"""
}
}
}

test("mytest") {
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
process PROCESS_C {
// No change
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
nextflow_process {

name "Test process C"
script "../main.nf"
config "nextflow.config"
process "PROCESS_C"

test("mytest") {
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
include {
PROCESS_A;
PROCESS_B
} from '../../modules/a/main.nf'

workflow SUBWORKFLOW_A {
PROCESS_A()
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
nextflow_workflow {

name "Test subworkflow A"
script "../main.nf"
workflow "SUBWORKFLOW_A"
test("mytest") {
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
nextflow_pipeline {

name "Test pipeline"
script "../main.nf"
tag "PIPELINE"

test("Run with profile test") {
when { }
then { }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
nextflow_workflow {

name "Test main workflow"
script "../main.nf"
workflow "MAIN_WORKFLOW"
test("mytest") {
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
include { SUBWORKFLOW_A } from '../subworkflows/a/main.nf'

workflow main {
//
}
3 changes: 3 additions & 0 deletions .github/actions/detect-nf-test-changes/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
__pycache__/
tests/__pycache__/
*.pyc
22 changes: 22 additions & 0 deletions .github/actions/detect-nf-test-changes/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased] - YYYY-MM-DD

### Added
* This template of a changelog. It is not really the changelog for this
template repository.

### Changed

### Deprecated

### Removed

### Fixed


## [x.x.x] - YYYY-MM-DD
13 changes: 13 additions & 0 deletions .github/actions/detect-nf-test-changes/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM python:3.12-slim-bullseye

COPY requirements.txt requirements.txt

RUN apt-get update \
&& apt-get install -y git \
&& pip install --no-cache-dir --upgrade pip \
&& pip install -r requirements.txt

COPY entrypoint.py /entrypoint.py
COPY entrypoint.sh /entrypoint.sh

ENTRYPOINT ["/entrypoint.sh"]
21 changes: 21 additions & 0 deletions .github/actions/detect-nf-test-changes/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2020 Vincent A. Cicirello

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading
Loading