Skip to content

Commit bdc935f

Browse files
authored
Switch CI to github actions and remove Travis (#199)
* copy over CI workflow from CSV.jl (minus docs) * no windows build * remove .travis.yml * run docs on 1.x * versions are strings * versions are actually ARRAY * replace badge * split nightly test out into ci-future workflow to allow failure * use julia-actions/julia-docdeploy * adjust lr test for 1.6 * run tests on 32 bit ubuntu for 1.x
1 parent 0ba8a88 commit bdc935f

File tree

6 files changed

+129
-42
lines changed

6 files changed

+129
-42
lines changed

.github/workflows/ci-future.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: CI-future
2+
on:
3+
pull_request:
4+
branches:
5+
- master
6+
push:
7+
branches:
8+
- master
9+
tags: '*'
10+
jobs:
11+
test:
12+
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
13+
env:
14+
JULIA_NUM_THREADS: 2
15+
runs-on: ${{ matrix.os }}
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
version:
20+
- 'nightly'
21+
os:
22+
- ubuntu-latest
23+
arch:
24+
- x64
25+
steps:
26+
- run: git config --global core.autocrlf false
27+
- uses: actions/checkout@v2
28+
- uses: julia-actions/setup-julia@v1
29+
with:
30+
version: ${{ matrix.version }}
31+
arch: ${{ matrix.arch }}
32+
- uses: actions/cache@v1
33+
env:
34+
cache-name: cache-artifacts
35+
with:
36+
path: ~/.julia/artifacts
37+
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
38+
restore-keys: |
39+
${{ runner.os }}-test-${{ env.cache-name }}-
40+
${{ runner.os }}-test-
41+
${{ runner.os }}-
42+
- uses: julia-actions/julia-buildpkg@v1
43+
- uses: julia-actions/julia-runtest@v1
44+
- uses: julia-actions/julia-processcoverage@v1
45+
- uses: codecov/codecov-action@v1
46+
with:
47+
file: lcov.info

.github/workflows/ci.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: CI
2+
on:
3+
pull_request:
4+
branches:
5+
- master
6+
push:
7+
branches:
8+
- master
9+
tags: '*'
10+
jobs:
11+
test:
12+
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
13+
env:
14+
JULIA_NUM_THREADS: 2
15+
runs-on: ${{ matrix.os }}
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
version:
20+
- '1.0'
21+
- '1' # automatically expands to the latest stable 1.x release of Julia
22+
os:
23+
- ubuntu-latest
24+
arch:
25+
- x64
26+
include:
27+
- os: ubuntu-latest
28+
arch: 'x86'
29+
version: '1'
30+
steps:
31+
- run: git config --global core.autocrlf false
32+
- uses: actions/checkout@v2
33+
- uses: julia-actions/setup-julia@v1
34+
with:
35+
version: ${{ matrix.version }}
36+
arch: ${{ matrix.arch }}
37+
- uses: actions/cache@v1
38+
env:
39+
cache-name: cache-artifacts
40+
with:
41+
path: ~/.julia/artifacts
42+
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
43+
restore-keys: |
44+
${{ runner.os }}-test-${{ env.cache-name }}-
45+
${{ runner.os }}-test-
46+
${{ runner.os }}-
47+
- uses: julia-actions/julia-buildpkg@v1
48+
- uses: julia-actions/julia-runtest@v1
49+
- uses: julia-actions/julia-processcoverage@v1
50+
- uses: codecov/codecov-action@v1
51+
with:
52+
file: lcov.info

.github/workflows/docs.yml

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,14 @@ on:
66
- 'master'
77
tags: '*'
88
pull_request:
9-
109
jobs:
11-
build:
12-
runs-on: ${{ matrix.os }}
13-
strategy:
14-
matrix:
15-
julia-version: [1.3.0]
16-
julia-arch: [x86]
17-
os: [ubuntu-latest]
10+
Documenter:
11+
name: Documentation
12+
runs-on: ubuntu-latest
1813
steps:
19-
- uses: actions/[email protected]
20-
- uses: julia-actions/setup-julia@latest
21-
with:
22-
version: ${{ matrix.julia-version }}
23-
- name: Install dependencies
24-
run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
25-
- name: Build and deploy
14+
- uses: actions/checkout@v2
15+
- uses: julia-actions/julia-buildpkg@latest
16+
- uses: julia-actions/julia-docdeploy@latest
2617
env:
27-
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # For authentication with SSH deploy key
28-
run: julia --project=docs/ docs/make.jl
18+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19+
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}

.travis.yml

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

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# StatsModels
22

3-
[![Build Status](https://travis-ci.com/JuliaStats/StatsModels.jl.svg?branch=master)](https://travis-ci.com/JuliaStats/StatsModels.jl)
3+
[![Build Status](https://github.com/JuliaStats/StatsModels.jl/workflows/CI/badge.svg)](https://github.com/JuliaStats/StatsModels.jl/actions?query=workflow%3ACI+branch%3Amaster)
44
[![codecov](https://codecov.io/gh/JuliaStats/StatsModels.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/JuliaStats/StatsModels.jl)
55

66
Basic functionality for specifying, fitting, and evaluating statistical models

test/statsmodel.jl

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -276,13 +276,25 @@ end
276276
lrtest(m0, m1))
277277
@test isnan(lr2.pval[1])
278278
@test lr2.pval[2] 1.2147224767092312e-5
279-
@test sprint(show, lr2) == """
280-
Likelihood-ratio test: 2 models fitted on 4 observations
281-
──────────────────────────────────────────────
282-
DOF ΔDOF Deviance ΔDeviance p(>Chisq)
283-
──────────────────────────────────────────────
284-
[1] 0 30.0000
285-
[2] 1 1 10.8600 -19.1400 <1e-4
286-
──────────────────────────────────────────────"""
287279

288-
end
280+
# in 1.6, p value printing has changed (JuliaStats/StatsBase.jl#606)
281+
if VERSION > v"1.6.0-DEV"
282+
@test sprint(show, lr2) == """
283+
Likelihood-ratio test: 2 models fitted on 4 observations
284+
──────────────────────────────────────────────
285+
DOF ΔDOF Deviance ΔDeviance p(>Chisq)
286+
──────────────────────────────────────────────
287+
[1] 0 30.0000
288+
[2] 1 1 10.8600 -19.1400 <1e-04
289+
──────────────────────────────────────────────"""
290+
else
291+
@test sprint(show, lr2) == """
292+
Likelihood-ratio test: 2 models fitted on 4 observations
293+
──────────────────────────────────────────────
294+
DOF ΔDOF Deviance ΔDeviance p(>Chisq)
295+
──────────────────────────────────────────────
296+
[1] 0 30.0000
297+
[2] 1 1 10.8600 -19.1400 <1e-4
298+
──────────────────────────────────────────────"""
299+
end
300+
end

0 commit comments

Comments
 (0)