Skip to content

Commit 9ac3198

Browse files
authored
Switch CI support from Travis to GitHub Actions (#8)
Created .github/workflows/ci.yml; iterated to figure out how to properly run the tests and upload coverage to Codecov. Updated README badges.
1 parent eceae99 commit 9ac3198

File tree

3 files changed

+62
-19
lines changed

3 files changed

+62
-19
lines changed

.github/workflows/ci.yml

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: CI
2+
3+
on:
4+
# Triggers the workflow on push or pull request events for the master/develop branches
5+
push:
6+
branches:
7+
- master
8+
- develop
9+
pull_request:
10+
branches:
11+
- master
12+
- develop
13+
# Allows us to run this workflow manually
14+
workflow_dispatch:
15+
16+
jobs:
17+
main:
18+
runs-on: ubuntu-latest
19+
20+
strategy:
21+
matrix:
22+
python-version: [3.8, 3.7, 3.6]
23+
24+
name: "Python ${{ matrix.python-version }}"
25+
steps:
26+
- uses: actions/checkout@v2
27+
28+
- name: Set up Python ${{ matrix.python-version }}
29+
uses: actions/setup-python@v2
30+
with:
31+
python-version: ${{ matrix.python-version }}
32+
33+
- name: Package setup
34+
shell: bash
35+
run: |
36+
pip install -r requirements.txt
37+
pip install .
38+
39+
- name: Package tests
40+
shell: bash
41+
run: pytest --cov=./dassh ./tests/ --cov-report xml:coverage_${{ matrix.python-version }}.xml
42+
43+
- name: Upload coverage to Codecov
44+
uses: codecov/codecov-action@v2
45+
with:
46+
fail_ci_if_error: true
47+
flags: unittests
48+
name: codecov-umbrella
49+
verbose: true
50+
files: coverage_${{ matrix.python-version }}.xml
51+
# dry_run: true
52+
53+
#finish:
54+
# needs: main
55+
# runs-on: ubuntu-latest
56+
# steps:
57+
# - name: CodeCov
58+
# shell: bash
59+
# run: codecov
60+

.travis.yml

-17
This file was deleted.

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Ducted Assembly Steady State Heat Transfer Software (DASSH)
22

3-
[![Build Status](https://travis-ci.com/dassh-dev/dassh.svg?token=9JiRbxest2oH9X8ijsPq&branch=master)](https://travis-ci.com/github/dassh-dev/dassh)
4-
[![codecov](https://codecov.io/gh/dassh-dev/dassh/branch/master/graph/badge.svg)](https://app.codecov.io/gh/dassh-dev/dassh)
3+
[![Build](https://github.com/github/docs/actions/workflows/ci.yml/badge.svg?branch=develop)
4+
[![codecov](https://codecov.io/gh/dassh-dev/dassh/branch/develop/graph/badge.svg)](https://app.codecov.io/gh/dassh-dev/dassh)
55
[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)
66

77

0 commit comments

Comments
 (0)