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

Unit testing #77

Merged
merged 28 commits into from
Aug 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
8ffc1bf
trying unit testing with github finally
lskatz Aug 3, 2023
3781970
perl_ci.yml: update OS; only one perl version
lskatz Aug 3, 2023
f5dd764
apt before cpanm
lskatz Aug 3, 2023
ea90fd1
perl_ci.yml: apt-get update
lskatz Aug 3, 2023
e617394
perl_ci.yml: force a perl cache
lskatz Aug 3, 2023
8e69083
trying to cache again
lskatz Aug 3, 2023
443fe98
perl_ci.yml: --no-test --force
lskatz Aug 3, 2023
96ef25c
perl_ci.yml: remove bio::kmer from cache
lskatz Aug 3, 2023
2f09456
perl_ci.yml: typo
lskatz Aug 3, 2023
8654d64
perl_ci.yml: add in more apt-get
lskatz Aug 3, 2023
644c15c
perl_ci.yml: enable-modules-cache:true
lskatz Aug 3, 2023
d972bbe
perl_ci.yml: cpanm installdeps
lskatz Aug 3, 2023
05adc9a
perl_ci.yml: modules and versions checking
lskatz Aug 3, 2023
4997208
perl_ci.yml: make test
lskatz Aug 3, 2023
fa80d23
perl_ci.yml: add in libdb-dev
lskatz Aug 3, 2023
e8f714e
perl_ci.yml: force notest cpanm
lskatz Aug 3, 2023
16deb8f
perl_ci.yml: force notest cpanm
lskatz Aug 3, 2023
703ae70
perl_ci.yml: force notest cpanm, second try
lskatz Aug 3, 2023
80d92bf
use shogo82148/actions-setup-perl directly for testing cache
lskatz Aug 3, 2023
1717af9
update cache.yml
lskatz Aug 3, 2023
8e54c98
update cache.yml
lskatz Aug 3, 2023
d9a05d2
update cache.yml
lskatz Aug 3, 2023
9dadf03
cache.yml: added JSON
lskatz Aug 3, 2023
6c9a684
install bio::perl natively in the github actions
lskatz Aug 3, 2023
726c8d6
added threading; more modules
lskatz Aug 3, 2023
f35b4cb
multithreading for perl_ci
lskatz Aug 3, 2023
44362f7
simplify the apt/cpanm portions
lskatz Aug 3, 2023
e1400ff
v1.3.1
lskatz Aug 3, 2023
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
33 changes: 33 additions & 0 deletions .github/workflows/cache.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: force-cache
on: [push]

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ['ubuntu-22.04']
perl: [ '5.34' ]
name: Perl ${{ matrix.perl }} on ${{ matrix.os }}
steps:
- name: apt-get to prepare for cached perl packages
run: |
sudo apt-get update -y
sudo apt-get install -y libdb-dev sqlite3 libgd-dev libsqlite3-dev libberkeleydb-perl libcdb-file-perl
- uses: actions/checkout@v3
- uses: shogo82148/actions-setup-perl@v1
with:
perl-version: '5.34'
install-modules-with: cpanm
install-modules-args: --with-develop --with-configure
multi-thread: true
install-modules: |
JSON
Bio::Perl
Bio::Kmer
Bio::Tree::Statistics
Bio::Matrix::IO
Bio::Tree::DistanceFactory
- run: |
echo "hello world!"
# prove -lv t
49 changes: 49 additions & 0 deletions .github/workflows/perl_ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions
# https://docs.github.com/en/actions/guides/publishing-docker-images
# https://github.com/docker/build-push-action/blob/master/docs/advanced/share-image-jobs.md
name: unit-testing
on: [push]

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ['ubuntu-22.04']
perl: [ '5.34' ]
#perl: [ '5.34', '5.32', '5.16.3' ]
name: Perl ${{ matrix.perl }} on ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Set up perl
uses: shogo82148/actions-setup-perl@v1
with:
perl-version: ${{ matrix.perl }}
install-modules-with: cpanm
install-modules-args: --with-develop --with-configure --force --no-test
enable-modules-cache: true
multi-thread: true
install-modules: |
JSON
Bio::Perl
Bio::Kmer
Bio::Tree::Statistics
Bio::Matrix::IO
Bio::Tree::DistanceFactory
- name: apt-get to prepare for cached perl packages
run: |
sudo apt-get update -y
sudo apt-get install -y libdb-dev sqlite3 libgd-dev libsqlite3-dev libberkeleydb-perl libcdb-file-perl quicktree mash
- name: cpanm installdeps --no-test --force
run: cpanm --installdeps . --no-test --force
- name: versions
run: |
mash --version
quicktree -v
sqlite3 --version
- run: perl -V
- name: perl modules checks
run: |
for i in Bio::Tree::Statistics threads Bio::Matrix::IO Bio::Tree::DistanceFactory; do perl -M$i -e 'print "checking module $i";'; done
- name: make test
run: perl Makefile.PL && make && make test
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,13 @@ inc/
/MANIFEST.bak
/pm_to_blib
/*.zip

# temp testing files
t/lambda/lambda.fofn
t/lambda/lambda/
t/lambda/list.lst
t/lambda/mashtree2.tmp/
t/lambda/sketches/
t/lambda/tmp.dnd
t/lambda/tmp/

2 changes: 1 addition & 1 deletion lib/Mashtree.pm
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ local $0=basename $0;
######
# CONSTANTS

our $VERSION = "1.3.0";
our $VERSION = "1.3.1";
our $MASHTREE_VERSION=$VERSION;
our @fastqExt=qw(.fastq.gz .fastq .fq .fq.gz);
our @fastaExt=qw(.fasta .fna .faa .mfa .fas .fsa .fa);
Expand Down
4 changes: 4 additions & 0 deletions t/10_sqlite.t
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ use File::Basename qw/dirname/;
use File::Temp qw/tempdir/;
use Data::Dumper;

use FindBin qw/$RealBin/;
use lib "$RealBin/../lib/perl5";
use lib "$RealBin/../lib/perl5/x86_64-linux-thread-multi/";

use Test::More tests => 5;

use_ok 'Mashtree';
Expand Down