Skip to content

Commit

Permalink
pkg-test fail
Browse files Browse the repository at this point in the history
  • Loading branch information
drernie committed Sep 5, 2023
1 parent f166844 commit c07fafb
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 9 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/pkg-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Test

on:
# Trigger at every push. Action will also be visible from Pull Requests to master
push: # Comment this line to trigger action only on pull-requests (not recommended if you don't pay for GH Actions)
pull_request:
branches: [master]

permissions: read-all

jobs:
build:
name: Test
permissions:
contents: read
id-token: write
issues: write
pull-requests: write

strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
java_version: [19]
runs-on: ${{ matrix.os }}

steps:
# Git Checkout
- name: Checkout Code
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v3
with:
role-to-assume: arn:aws:iam::712023778557:role/GitHub-Testing-NF-Quilt
aws-region: us-east-1

- name: Setup Java ${{matrix.java_version}}
uses: actions/setup-java@v3
with:
java-version: ${{matrix.java_version}}
distribution: 'temurin'
architecture: x64
cache: gradle

- name: Setup Gradle
uses: gradle/gradle-build-action@v2

- name: Run Package Tests
run: make pkg-test

- name: Archive production artifacts
if: ${{ success() }} || ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: nf-quilt-pkg-test
path: |
/home/runner/work/nf-quilt/nf-quilt/plugins/nf-quilt/build/reports/tests/test/
5 changes: 3 additions & 2 deletions plugins/nf-quilt/src/main/nextflow/quilt/QuiltProduct.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,9 @@ ${meta['workflow']['stats']['processes']}
return template.toString()
}

List<Path> match(String glob) throws IOException {
Path folder = pkg.install()
List<Path> match(String glob, boolean shouldInstall = false) throws IOException {
log.debug("QuiltProduct.match[$shouldInstall]: $glob")
Path folder = shouldInstall ? pkg.install() : pkg.packageDest()
FileSystem fs = FileSystems.getDefault()
PathMatcher pathMatcher = fs.getPathMatcher("glob:${glob}")
List<Path> matches = []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,17 +137,17 @@ class QuiltPackage {
return namespace
}

String resolveHash() {
String resolveHash(Namespace namespace) {
if (hash == 'latest' || hash == null || hash == 'null') {
Namespace namespace = packageNamespace()
return namespace.getHash('latest')
}
return hash
}

Manifest packageManifest() {
Namespace namespace = packageNamespace()
Manifest manifest = namespace.getManifest(resolveHash())
String newHash = resolveHash(namespace)
Manifest manifest = namespace.getManifest(newHash)
return manifest
}

Expand Down Expand Up @@ -204,7 +204,6 @@ class QuiltPackage {
try {
log.info("installing $packageName from $bucket...")
Manifest manifest = packageManifest()

manifest.install(dest)
log.info('done')
installed = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -272,12 +272,13 @@ class QuiltFileSystemProvider extends FileSystemProvider {
attributesCache = [:] // reset cache
notifyFilePublish(qPath)
} else {
// log.debug("\tEnsure installed: $installedPath")
// ensure QuiltPackage installed
QuiltPackage pkg = qPath.pkg()
pkg.install()
qPath.pkg().install()
log.debug("\tReading from: $installedPath")
}
//log.debug("\tOpening channel to: $installedPath")
FileChannel channel = FileChannel.open(installedPath, options)
log.debug("FileChannel.open: ${channel}")
return channel
}
catch (java.nio.file.NoSuchFileException e) {
Expand Down

0 comments on commit c07fafb

Please sign in to comment.