snakemake / snakemake-github-action

A Github action for running a Snakemake workflow
MIT License
51 stars 12 forks source link

Workflow defines configfile config/config.yml but it is not present or accessible. #22

Open Ulthran opened 2 years ago

Ulthran commented 2 years ago

How do I specify the path to my config file? I've tried moving it around but the GH action doesn't seem to pick it up from anywhere automatically.

.github/workflows/main.yaml

# This is a basic workflow to help you get started with Actions

name: CI

# Controls when the workflow will run
on:
  # Triggers the workflow on push or pull request events but only for the master branch
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

  # Allows you to run this workflow manually from the Actions tab
  workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
  snakemake:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Linting
        uses: snakemake/snakemake-github-action@v1
        with:
          directory: '.test'
          snakefile: 'workflow/Snakefile'
          args: '--lint'

      - name: Testing
        uses: snakemake/snakemake-github-action@v1
        with:
          directory: '.test'
          snakefile: 'workflow/Snakefile'
          args: '--cores 1 --use-conda --conda-cleanup-pkgs cache'
          stagein: '' # additional preliminary commands to run (can be multiline)

      - name: Create container file
        uses: snakemake/snakemake-github-action@v1
        with:
          snakefile: 'workflow/Snakefile'
          task: 'containerize'
riasc commented 1 year ago

Hi, have you solved this? Run into the same issue

DavideBrex commented 1 year ago

I have the same problem

pushpinder-bu commented 1 year ago

I am running into the same issue. Anyone found a solution?

riasc commented 1 year ago

I used the --configfile option to explicitly define the config file: args: '--lint --configfile .tests/integration/config_basic/config.yaml' works with this