Skip to content

Update build_and_test.yml #210

Update build_and_test.yml

Update build_and_test.yml #210

name: Build and test
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build-n-test-ubuntu:
runs-on: ubuntu-22.04
services:
# Label used to access the service container
mysql:
# Docker Hub image
image: mysql:5.7
# Provide the config for MySQL
# The database credentials correspond to the config file
# tests\short\examples\testconfig.json
env:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: aug_vertebrates
MYSQL_USER: augustus
MYSQL_PASSWORD: aug_passwd
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out the repository under $GITHUB_WORKSPACE, so the job can access it
- uses: actions/checkout@v2
# Install python-mysql-connector
- name: Install python-mysql-connector
run: pip3 install mysql-connector-python
# Install required dependencies
- name: Install dependencies
run: sudo ./tests/short/utils/installDependencies.sh
# Build AUGUSTUS
- name: Build AUGUSTUS
run: make all
# Execute unit tests
- name: Execute unit tests
run: make unit_test
# Test AUGUSTUS
- name: Test AUGUSTUS (examples folder with comparison)
run: ./execute_test.py --compare --html --mysql examples
working-directory: tests/short/
# Test bam2wig
- name: Test bam2wig
run: ./execute_test.py --compare --html bam2wig
working-directory: tests/short/
# Test bam2hints
- name: Test bam2hints
run: ./execute_test.py --compare --html bam2hints
working-directory: tests/short/
# Test filterbam
- name: Test filterbam
run: ./execute_test.py --compare --html filterbam
working-directory: tests/short/
# Upload html diffs of failed test cases
- name: Upload HTML diffs
uses: actions/upload-artifact@v2
if: failure()
with:
name: html-diffs
path: tests/short/output_html/
# Build and publich doxygen documentation (only on push in master)
- name: Build documentation
if: ${{ github.ref == 'refs/heads/master' && github.event_name == 'push' }}
uses: mattnotmitt/doxygen-action@v1
with:
doxyfile-path: 'doxygen.conf'
- name: Publish documentation of master on gh-pages
if: ${{ github.ref == 'refs/heads/master' && github.event_name == 'push' }}
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./doxygen/html/
build-n-test-macos:
runs-on: macos-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out the repository under $GITHUB_WORKSPACE, so the job can access it
- uses: actions/checkout@v2
# Install required dependencies
- name: Install dependencies
run: |
brew install boost
brew install zlib
brew install gsl
brew install suite-sparse
brew install lp_solve
brew install sqlite
brew install mysql
brew install mysql++
brew install bamtools
brew install samtools
brew install htslib
# Build AUGUSTUS
- name: Build AUGUSTUS
run: make all
# Execute unit tests
#TODO: make working on mac
# - name: Execute unit tests
# run: make unit_test
# Test AUGUSTUS
- name: Test AUGUSTUS (examples folder without mysql and comparison on mac)
run: ./execute_test.py examples
working-directory: tests/short/
# Test bam2wig
- name: Test bam2wig
run: ./execute_test.py --compare --html bam2wig
working-directory: tests/short/
# Test bam2hints
- name: Test bam2hints
run: ./execute_test.py --compare --html bam2hints
working-directory: tests/short/
# Test filterbam
- name: Test filterbam
run: ./execute_test.py --compare --html filterbam
working-directory: tests/short/