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

GHA for doublet-detection module #462

Merged
merged 15 commits into from
May 28, 2024
62 changes: 62 additions & 0 deletions .github/workflows/run_doublet-detection.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# This is a workflow to run the doublet-detection module
# This module has both an renv and a conda environment
#
# Analysis modules are run based on three triggers:
# - Manual trigger
# - On pull requests where code in the module has changed
# - As a reusable workflow called from a separate workflow which periodically runs all modules

name: Run doublet-detection analysis module
env:
MODULE_PATH: analyses/doublet-detection
AWS_DEFAULT_REGION: us-east-1

concurrency:
# only one run per branch at a time
group: doublet-detection-${{ github.ref }}
cancel-in-progress: true

on:
workflow_dispatch:
workflow_call:
pull_request:
branches:
- main
paths:
- analyses/doublet-detection/**
jobs:
run-module:
runs-on: ubuntu-latest
sjspielman marked this conversation as resolved.
Show resolved Hide resolved

steps:
- name: Checkout repo
uses: actions/checkout@v4

# Eventually, a step to download data will go here.

- name: Set up R
uses: r-lib/actions/setup-r@v2
with:
r-version: 4.4.0
use-public-rspm: true

- name: Set up pandoc
uses: r-lib/actions/setup-pandoc@v2

- name: Set up renv
uses: r-lib/actions/setup-renv@v2
with:
working-directory: ${{ env.MODULE_PATH }}

- name: Set up conda
uses: conda-incubator/setup-miniconda@v3

- name: Install and activate locked conda environment
run: |
conda install conda-lock
conda-lock install --name doublet-detection ${MODULE_PATH}/conda-lock.yml

- name: Run doublet-detection module
run: |
cd $MODULE_PATH
bash run_doublet-detection.sh