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

add short CI workflow (requires python only, no R) #117

Closed
wants to merge 2 commits into from
Closed
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
55 changes: 55 additions & 0 deletions .github/workflows/update-loci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Update data

on:
pull_request:
branches: main
paths:
- "data/**"
- "scripts/**"
- "workflow/**"
- ".github/workflows/**"
workflow_dispatch:

jobs:
update:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
strategy:
fail-fast: false

steps:
- name: Debug dump
uses: crazy-max/ghaction-dump-context@v2

- name: Checkout code
uses: actions/checkout@v4

- name: Set up Miniconda environment
uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
activate-environment: strchive
environment-file: scripts/environment.yml
python-version: 3.12
auto-activate-base: false
- run: |
conda info

- name: Check loci and update bed files (short)
if: ${{ github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'}}
run: snakemake --config stages="skip-refs"

- name: Open pull request with updated files
if: ${{ !(github.event_name == 'pull_request') }}
uses: peter-evans/create-pull-request@v7
with:
branch: update-data
title: Update data

- name: Commit updated files to current pull request
if: ${{ github.event_name == 'pull_request' }}
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Update data
23 changes: 23 additions & 0 deletions scripts/setup-miniconda-patched-environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: strchive
channels:
- bioconda
- conda-forge
dependencies:
- pandas
- numpy
- biopython
- defopt
- snakemake
- jsbeautifier
- r-base
- r-essentials
- r-jsonlite
- r-dplyr
- r-rentrez
- r-easypubmed
- r-stringr
- r-purrr
- pip
- pip:
- manubot
- python=3.12