Use modern build status markdown #23
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build | |
on: [push, pull_request] | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-22.04] | |
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] | |
perl-version: [latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Set up Perl ${{ matrix.perl-version }} | |
uses: shogo82148/actions-setup-perl@v1 | |
with: | |
perl-version: ${{ matrix.perl-version }} | |
- name: Install dependencies | |
run: | | |
pip install coverage scons ihm | |
cpanm --quiet --notest --skip-satisfied Devel::Cover::Report::Codecov Test::Exception Test::Output Test::MockModule Devel::Cover MIME::Lite DBI CGI Error | |
# Patch Devel::Cover::Report::Codecov to support GitHub Actions | |
# from https://github.com/codecov/codecov-perl/pull/41 | |
reportdir=$(dirname $(perldoc -l Devel::Cover::Report::Codecov) ) | |
curl https://github.com/codecov/codecov-perl/commit/75ac8c01b3cccbff0acc879467b3952cd9605210.patch > gha.patch && patch -p5 < gha.patch && cp Codecov/Service/GitHub.pm $reportdir/Codecov/Service/GitHub.pm | |
git clone --depth=5 https://github.com/salilab/saliweb | |
export PERL=`echo $PERL5LIB | cut -d: -f1` | |
export PYTHON=`pip show coverage |grep Location|cut -b11-` | |
(cd saliweb && scons modeller_key=UNKNOWN pythondir=$PYTHON perldir=$PERL prefix=~/usr webdir=~/www install && touch $PYTHON/saliweb/frontend/config.py) | |
- name: Test | |
run: | | |
scons coverage=true python=$(which python) test | |
- name: Upload Python coverage to codecov | |
uses: codecov/codecov-action@v4 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
- name: Upload Perl coverage to codecov | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
run: | | |
cover -report codecov |