Skip to content

Commit 6256191

Browse files
committed
Run tests (i.e., build status) using Github Actions
1 parent 9a18029 commit 6256191

File tree

5 files changed

+63
-7
lines changed

5 files changed

+63
-7
lines changed

.github/workflows/CI.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: CI
2+
3+
# Run on master, tags, or any pull request
4+
on:
5+
push:
6+
branches: [master]
7+
tags: ["*"]
8+
pull_request:
9+
10+
jobs:
11+
# unit tests with coverage
12+
test:
13+
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }}
14+
runs-on: ${{ matrix.os }}
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
version:
19+
- "1" # Earliest
20+
- "1.6" # Latest
21+
os:
22+
- ubuntu-latest
23+
- windows-latest
24+
- macos-latest
25+
arch:
26+
- x64
27+
steps:
28+
# check out the project and install Julia
29+
- uses: actions/checkout@v2
30+
- uses: julia-actions/setup-julia@v1
31+
with:
32+
version: ${{ matrix.version }}
33+
arch: ${{ matrix.arch }}
34+
35+
# using a cache can speed up execution times
36+
- uses: actions/cache@v2
37+
env:
38+
cache-name: cache-artifacts
39+
with:
40+
path: ~/.julia/artifacts
41+
key: ${{ runner.os }}-${{ matrix.arch }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
42+
restore-keys: |
43+
${{ runner.os }}-${{ matrix.arch }}-test-${{ env.cache-name }}-
44+
${{ runner.os }}-${{ matrix.arch }}-test-
45+
${{ runner.os }}-${{ matrix.arch }}-
46+
${{ runner.os }}-
47+
48+
# build the depencies, run the tests, and upload coverage results
49+
- uses: julia-actions/julia-buildpkg@latest
50+
- run: |
51+
git config --global user.name Tester
52+
git config --global user.email [email protected]
53+
- name: Run Tests
54+
uses: julia-actions/julia-runtest@latest
55+
- uses: julia-actions/julia-processcoverage@v1
56+
- uses: codecov/codecov-action@v1
57+
with:
58+
file: ./lcov.info
59+
flags: unittests
60+
name: codecov-umbrella
File renamed without changes.

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,6 @@ This library supports representation, inference, and learning in Bayesian networ
44

55
Please read the [documentation](https://sisl.github.io/BayesNets.jl/dev/index.html).
66

7-
![Build Status](https://github.com/sisl/BayesNets.jl/actions/workflows/main.yml/badge.svg) [![Coverage Status](https://coveralls.io/repos/sisl/BayesNets.jl/badge.svg?branch=master&service=github)](https://coveralls.io/github/sisl/BayesNets.jl?branch=master)
7+
[![Documentation](https://img.shields.io/badge/docs-latest-blue.svg)](https://sisl.github.io/BayesNets.jl/dev/index.html)
8+
[![Build Status](https://github.com/sisl/BayesNets.jl/actions/workflows/CI.yml/badge.svg)](https://github.com/sisl/BayesNets.jl/actions/workflows/CI.yml)
9+
[![Code Coverage](https://codecov.io/gh/sisl/BayesNets.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/sisl/BayesNets.jl)

test/runtests.jl

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,4 @@ end
7272
@testset "gen bn" begin
7373
include(joinpath(testdir, "test_genbn.jl"))
7474
end
75-
@testset "docs" begin
76-
include(joinpath(testdir, "test_docs.jl"))
77-
end
7875
end

test/test_docs.jl

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)