GitHub Actions for building/testing biber fails
Closed this issue · 10 comments
Based on your GH Action https://github.com/plk/biber/blob/dev/.github/workflows/main.yml, I wrote the following one which I run in my own repo.
I am getting the following test error. How can I fix this? Thanks :)
Full log:
log.txt
Installing /home/runner/work/busyperl/localperl/man/man3/Test::Differences.3
DCANTRELL/Test-Differences-0.71.tar.gz
/usr/bin/make install -- OK
t/annotations.t ........... ok
t/basic-misc.t ............ ok
t/bcfvalidation.t ......... ok
t/biblatexml.t ............ ok
t/bibtex-aliases.t ........ ok
t/bibtex-output.t ......... ok
t/configfile.t ............ ok
t/crossrefs.t ............. ok
t/datalists.t ............. ok
t/dateformats.t ........... ok
t/dm-constraints.t ........ ok
t/encoding.t .............. ok
t/extradate.t ............. ok
t/extratitle.t ............ ok
t/extratitleyear.t ........ ok
t/full-bbl.t .............. ok
t/full-bblxml.t ........... ok
t/full-bibtex.t ........... ok
t/full-dot.t .............. ok
t/labelalpha.t ............ ok
t/labelalphaname.t ........ ok
t/labelname.t ............. ok
t/langtags.t .............. ok
t/maps.t .................. ok
t/names.t ................. ok
t/names_x.t ............... ok
t/options.t ............... ok
t/related-entries.t ....... ok
# Failed test 'Fetch from plain bib download'
# at t/remote-files.t line 91.
# --- Got
# +++ Expected
# @@ -25,6 +25,7 @@
# \\field{labeldatesource}{}
# \\field{labelnamesource}{author}
# \\field{labeltitlesource}{title}
# + \\field{journaltitle}{Artificial Intelligence}
# \\field{title}{Approximating {MAP}s for belief networks is {NP}-hard and other theorems}
# \\field{volume}{102}
# \\field{year}{1998}
# Looks like you failed 1 test of 1.
t/remote-files.t ..........
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/1 subtests
t/sections-complex.t ...... ok
t/sections.t .............. ok
t/set-dynamic.t ........... ok
t/set-legacy.t ............ ok
t/set-static.t ............ ok
t/skips.t ................. ok
t/skipsg.t ................ ok
t/sort-case.t ............. ok
t/sort-complex.t .......... ok
t/sort-names.t ............ ok
t/sort-order.t ............ ok
t/sort-uc.t ............... ok
t/sorting.t ............... ok
t/tool-bltxml-inout.t ..... ok
t/tool-bltxml.t ........... ok
t/tool-config.t ........... ok
t/tool.t .................. ok
t/translit.t .............. ok
t/truncation.t ............ ok
t/uniqueness-nameparts.t .. ok
t/uniqueness.t ............ ok
t/utils.t ................. ok
t/xdata.t ................. ok
Test Summary Report
-------------------
t/remote-files.t (Wstat: 256 Tests: 1 Failed: 1)
Failed test: 1
name: buildbiberdeps
env:
URLPERL: https://www.cpan.org/src/5.0/perl-5.32.0.tar.gz
MAKEFLAGS: -j2
BIBER_DEV_TESTS: 1
on: workflow_dispatch
jobs:
buildbiberdeps:
runs-on: ubuntu-22.04
steps:
- name: Install Perl
run: |
mkdir perlsource
wget -nc $URLPERL
tar -xf $(basename $URLPERL) --strip-components=1 --directory=perlsource
pushd perlsource
bash +x ./Configure -sde -Dprefix="$RUNNER_WORKSPACE/localperl"
test -f Makefile
make
make install
popd
- name: Set ENV
run: |
echo "$RUNNER_WORKSPACE/localperl/bin" >> $GITHUB_PATH
echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$RUNNER_WORKSPACE/localperl/lib" >> $GITHUB_ENV
- name: Install Biber
run: git clone https://github.com/plk/biber
- name: Install Biber Dependencies Without Test
run: |
cd biber
cpan -T Module::Build
perl Build.PL
perl ./Build installdeps --cpan_client "cpan -T"
perl ./Build test
This is usually just because there is an issue getting the remote definitions file mentioned in the .bcf
for that test:
https://webspace.science.uu.nl/~bodla101/graphs-bib/definitions.bib
You can usually just ignore errors in the remote test.
Are you referring to this bcf file? https://github.com/plk/biber/blob/dev/testfiles/test.bcf
Also, should I manually download the font file from old sourceforge testfiles directory?
No, the .bcf
for the remote test:
https://github.com/plk/biber/blob/dev/t/tdata/remote-files.bcf
You don't need the font file - it's only used as part of distribution release to create some documentation.
Is there a way to disable/skipping this t/remote-files.t
from running? (so that the full test suite is expected to complete)
Yes, make sure that the environment variable BIBER_DEV_TESTS
is 0.
This worked! I think it's best to have all-pass tests by default (so that a flaky test isn't raising too many eyebrows)
Normally it doesn't run for anyone who doesn't set that env var - no idea why it was set for you ....
Because I copy-pasted your GH Action from this repo :)
It's also set to 1 in https://github.com/plk/biber/blob/dev/.github/workflows/main.yml
Btw, is there some testing script / GH Action to run after PAR::Packer packaging to verify correctness of packaging (that all dependencies were discovered/included and so forth)?
There are some test files on SF which can be run, usually with --convert-control
and --validate-control
to test that the XML libs are all there.