Skip to content

Commit

Permalink
Switch from Travis to GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
benmwebb committed Dec 17, 2020
1 parent cf53ce5 commit cde3ed3
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 28 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: build

on: [push, pull_request]

jobs:
build:

strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04]
python-version: [3.6, 3.7, 3.8, 3.9]
perl-version: [latest]
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
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 codecov flask pytest-cov pytest-pep8 coverage scons
cpanm --quiet --notest --skip-satisfied Devel::Cover::Report::Codecov Test::Exception Test::Output Devel::Cover 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
- name: Test
run: |
scons python=$(which python) test
py.test --cov=account/account --cov-branch --pep8 account
- name: Upload coverage to codecov
run: |
coverage combine
codecov
cd test/frontend && cover -report codecov
27 changes: 0 additions & 27 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[![docs](https://readthedocs.org/projects/saliweb/badge/)](https://salilab.org/saliweb/)
[![Build Status](https://travis-ci.com/salilab/saliweb.svg?branch=master)](https://travis-ci.com/salilab/saliweb)
[![Build Status](https://github.com/salilab/saliweb/workflows/build/badge.svg?branch=master)](https://github.com/salilab/saliweb/actions?query=workflow%3Abuild)
[![codecov](https://codecov.io/gh/salilab/saliweb/branch/master/graph/badge.svg)](https://codecov.io/gh/salilab/saliweb)
[![Coverity scan](https://img.shields.io/coverity/scan/8508.svg)](https://scan.coverity.com/projects/salilab-saliweb)
[![Code Climate](https://codeclimate.com/github/salilab/saliweb/badges/gpa.svg)](https://codeclimate.com/github/salilab/saliweb)
Expand Down

0 comments on commit cde3ed3

Please sign in to comment.