Skip to content

force cache

force cache #415

Workflow file for this run

name: unit-tests
on: [push]
env:
spadesVer: 3.14.1
KRAKEN_DEFAULT_DB: /kraken-database
# perl: [ '5.32', '5.30', '5.28' ]
# perl: [ '5.32', '5.30.1', '5.16.3', '5.12.3' ]
# os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
# https://github.com/marketplace/actions/setup-perl-environment
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ['ubuntu-20.04' ]
perl: [ '5.36.0' ]
python-version: ['3.10']
defaults:
run:
shell: bash -el {0}
name: Perl ${{ matrix.perl }} on ${{ matrix.os }}
steps:
- name: Get Date
id: get-date
run: |
today=$(/bin/date -u '+%Y%m%d')
echo $today
echo "today=$today" >> $GITHUB_OUTPUT
- name: set up conda
uses: conda-incubator/setup-miniconda@v3
with:
python-version: ${{ matrix.python-version }}
use-mamba: true
miniforge-variant: Mambaforge
miniforge-version: latest
channel-priority: strict
channels: conda-forge,bioconda,defaults
mamba-version: "*"
auto-activate-base: true
activate-environment: "~/conda_pkgs_dir/my-env"
use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly!
- name: conda info
run: |
conda info
echo
conda list
echo
conda config --show
- name: Cache Conda env
id: cache-conda
uses: actions/cache@v4
with:
path: |
~/conda_pkgs_dir
~/.conda
~/.condarc
#/usr/share/miniconda
key: conda-${{ runner.os }}--${{ runner.arch }}--${{ steps.get-date.outputs.today }}-perl_v${{ matrix.perl }}--${{env.CACHE_NUMBER}}
env:
CACHE_NUMBER: 7
- name: conda installations
shell: bash -el {0}
if: steps.cache-conda.outputs.cache-hit != 'true'
run: |
mamba install -y perl shovill krona samclip flash mash seqtk \
kmc lighter megahit pilon trimmomatic perl-bioperl kraken=1 \
spades skesa=2.4 python=3.7 perl-cg-pipeline perl-gd blast prodigal \
perl-app-cpanminus perl-statistics-descriptive perl-config-simple \
perl-file-slurp perl-text-levenshtein perl-moo perl-list-moreutils kma=1.4 \
multiqc fastqc bowtie2 perl-gd perl-gdgraph salmid staramr kalamari
- name: check installation
shell: bash -el {0}
run: |
perl -v
echo
python -V
echo
which perl
which python
echo
which kraken
kraken --version
which kraken-build
echo
echo conda
conda info
echo
ls -l ~/conda_pkgs_dir /usr/share/miniconda || true
- name: add some paths to PATH
run: |
echo "$GITHUB_WORKSPACE/CG-Pipeline/scripts" >> $GITHUB_PATH
echo
cat $GITHUB_PATH
- name: checkout my repo
uses: actions/checkout@v4
with:
path: SneakerNet
- name: checkout CG-Pipeline
uses: actions/checkout@v4
with:
repository: lskatz/CG-Pipeline
path: CG-Pipeline
ref: v0.5