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

Cache conda packages in GIthub Actions #466

Merged
merged 1 commit into from
Aug 1, 2024
Merged
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
4 changes: 3 additions & 1 deletion .github/envs/test_env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,6 @@ dependencies:
- pyparsing=2.3.1
- scipy
- matplotlib=3.8.4
- pandas
- pandas>2
- pip:
- ydiff
165 changes: 92 additions & 73 deletions .github/workflows/integration_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,79 +19,98 @@ jobs:
fail-fast: false

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3

- name: Set up Conda
uses: conda-incubator/setup-miniconda@v2
with:
mamba-version: "*"
- name: Setup Conda Env
uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: test_env
channels: conda-forge,bioconda,defaults
auto-activate-base: false
activate-environment: test_env
environment-file: .github/envs/test_env.yml

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y gcc g++ bowtie2 samtools libsys-hostname-long-perl
pip install ydiff

- name: Create directory for files
run: |
mkdir ../CRISPResso2_copy
cp -r * ../CRISPResso2_copy

- name: Copy C2_tests repo
uses: actions/checkout@v3
with:
repository: edilytics/CRISPResso2_tests
# ref: '<BRANCH-NAME>' # Use this to specify a branch other than master

- name: Run Basic
run: |
make basic test print

- name: Run Params
if: success() || failure()
run: |
make params test print

- name: Run Prime Editor
if: success() || failure()
run: |
make prime-editor test print

- name: Run Batch
if: success() || failure()
run: |
make batch test print

- name: Run Pooled
if: success() || failure()
run: |
make pooled test print

- name: Run Pooled Mixed Mode
if: success() || failure()
run: |
make pooled-mixed-mode test print

- name: Run Pooled Mixed Mode Demux
if: success() || failure()
run: |
make pooled-mixed-mode-genome-demux test print

- name: Run Pooled Paired Sim
if: success() || failure()
run: |
make pooled-paired-sim test print

- name: Run WGS
if: success() || failure()
run: |
make wgs test print

- name: Run Compare
if: success() || failure()
run: |
make compare test print
use-mamba: true

- name: Get Date
run: echo "today=$(/bin/date -u '+%Y%m%d')" >> $GITHUB_OUTPUT
shell: bash

- name: Cache Conda Env
id: cache-env
uses: actions/cache@v3
env:
# Increase this number to reset the cache if envs/test_env.yml hasn't changed
CACHE_NUMBER: 0
with:
path: /usr/share/miniconda/envs/test_env
key:
conda-${{ runner.os }}--${{ runner.arch }}--${{ steps.get-date.outputs.today }}-${{ env.CACHE_NUMBER }}-${{ hashFiles('.github/envs/test_env.yml') }}

- name: Update Conda Env
run: |
conda env update -n test_env -f .github/envs/test_env.yml
if: steps.cache-env.outputs.cache-hit != 'true'

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y gcc g++ bowtie2 samtools libsys-hostname-long-perl
conda list

- name: Create directory for files
run: |
mkdir ../CRISPResso2_copy
cp -r * ../CRISPResso2_copy

- name: Copy C2_tests repo
uses: actions/checkout@v3
with:
repository: edilytics/CRISPResso2_tests
# ref: '<BRANCH-NAME>' # update to specific branch

- name: Run Basic
run: |
make basic test print

- name: Run Params
if: success() || failure()
run: |
make params test print

- name: Run Prime Editor
if: success() || failure()
run: |
make prime-editor test print

- name: Run Batch
if: success() || failure()
run: |
make batch test print

- name: Run Pooled
if: success() || failure()
run: |
make pooled test print

- name: Run Pooled Mixed Mode
if: success() || failure()
run: |
make pooled-mixed-mode test print

- name: Run Pooled Mixed Mode Demux
if: success() || failure()
run: |
make pooled-mixed-mode-genome-demux test print

- name: Run Pooled Paired Sim
if: success() || failure()
run: |
make pooled-paired-sim test print

- name: Run WGS
if: success() || failure()
run: |
make wgs test print

- name: Run Compare
if: success() || failure()
run: |
make compare test print
Loading