From a7428e4fcc03d39503a7156d8a5504a625c4972f Mon Sep 17 00:00:00 2001 From: Dave Kleinschmidt Date: Sat, 28 Nov 2020 13:06:10 -0500 Subject: [PATCH 01/11] copy over CI workflow from CSV.jl (minus docs) --- .github/workflows/ci.yml | 53 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..fa3fa72e --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,53 @@ +name: CI +on: + pull_request: + branches: + - master + push: + branches: + - master + tags: '*' +jobs: + test: + name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} + env: + JULIA_NUM_THREADS: 2 + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + version: + - '1.0' + - '1' # automatically expands to the latest stable 1.x release of Julia + - 'nightly' + os: + - ubuntu-latest + arch: + - x64 + include: + - os: windows-latest + version: '1' + arch: x86 + steps: + - run: git config --global core.autocrlf false + - uses: actions/checkout@v2 + - uses: julia-actions/setup-julia@v1 + with: + version: ${{ matrix.version }} + arch: ${{ matrix.arch }} + - uses: actions/cache@v1 + env: + cache-name: cache-artifacts + with: + path: ~/.julia/artifacts + key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }} + restore-keys: | + ${{ runner.os }}-test-${{ env.cache-name }}- + ${{ runner.os }}-test- + ${{ runner.os }}- + - uses: julia-actions/julia-buildpkg@v1 + - uses: julia-actions/julia-runtest@v1 + - uses: julia-actions/julia-processcoverage@v1 + - uses: codecov/codecov-action@v1 + with: + file: lcov.info From 99dd1f88108e781c0b1612be57f37315a402b8bd Mon Sep 17 00:00:00 2001 From: Dave Kleinschmidt Date: Sat, 28 Nov 2020 13:06:55 -0500 Subject: [PATCH 02/11] no windows build --- .github/workflows/ci.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fa3fa72e..4e48e91a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,10 +24,6 @@ jobs: - ubuntu-latest arch: - x64 - include: - - os: windows-latest - version: '1' - arch: x86 steps: - run: git config --global core.autocrlf false - uses: actions/checkout@v2 From af83d60b20e725bce0e46a5e752f3525f3fe2cbb Mon Sep 17 00:00:00 2001 From: Dave Kleinschmidt Date: Sat, 28 Nov 2020 13:19:06 -0500 Subject: [PATCH 03/11] remove .travis.yml --- .travis.yml | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index a5f90d9c..00000000 --- a/.travis.yml +++ /dev/null @@ -1,15 +0,0 @@ -# Documentation: http://docs.travis-ci.com/user/languages/julia/ -language: julia -os: - - linux -julia: - - 1.0 - - 1 - - nightly -matrix: - allow_failures: - julia: nightly -notifications: - email: false -after_success: - - julia -e 'using Pkg; Pkg.add("Coverage"); using Coverage; Codecov.submit(process_folder())' From 724c3ddcd9729495ec411dfc6f7c38b7985a394c Mon Sep 17 00:00:00 2001 From: Dave Kleinschmidt Date: Sat, 28 Nov 2020 13:20:58 -0500 Subject: [PATCH 04/11] run docs on 1.x --- .github/workflows/docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index f15477f5..5077c544 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -12,7 +12,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - julia-version: [1.3.0] + julia-version: 1 # expands to latest 1.x series release... julia-arch: [x86] os: [ubuntu-latest] steps: From 63fbece8e6ea80a8555c2590e77e9e34695eb55f Mon Sep 17 00:00:00 2001 From: Dave Kleinschmidt Date: Sat, 28 Nov 2020 13:21:54 -0500 Subject: [PATCH 05/11] versions are strings --- .github/workflows/docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 5077c544..b1ced645 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -12,7 +12,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - julia-version: 1 # expands to latest 1.x series release... + julia-version: '1' # expands to latest 1.x series release... julia-arch: [x86] os: [ubuntu-latest] steps: From c76050b7901d342468a032e7de5704e01e8897a0 Mon Sep 17 00:00:00 2001 From: Dave Kleinschmidt Date: Sat, 28 Nov 2020 13:23:11 -0500 Subject: [PATCH 06/11] versions are actually ARRAY --- .github/workflows/docs.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index b1ced645..74a05fae 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -12,7 +12,8 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - julia-version: '1' # expands to latest 1.x series release... + julia-version: + - '1' # expands to latest 1.x series release... julia-arch: [x86] os: [ubuntu-latest] steps: From 4da650bc9e30e85cb44550547c4583c102402bf4 Mon Sep 17 00:00:00 2001 From: Dave Kleinschmidt Date: Sat, 28 Nov 2020 14:06:49 -0500 Subject: [PATCH 07/11] replace badge --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6babc5c2..1efeb3cb 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # StatsModels -[![Build Status](https://travis-ci.com/JuliaStats/StatsModels.jl.svg?branch=master)](https://travis-ci.com/JuliaStats/StatsModels.jl) +[![Build Status](https://github.com/JuliaStats/StatsModels.jl/workflows/CI/badge.svg)](https://github.com/JuliaStats/StatsModels.jl/actions?query=workflow%3ACI+branch%3Amaster) [![codecov](https://codecov.io/gh/JuliaStats/StatsModels.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/JuliaStats/StatsModels.jl) Basic functionality for specifying, fitting, and evaluating statistical models From b7734e2105366a85ba99ba45e303ce0f6d3fea08 Mon Sep 17 00:00:00 2001 From: Dave Kleinschmidt Date: Sat, 28 Nov 2020 14:07:43 -0500 Subject: [PATCH 08/11] split nightly test out into ci-future workflow to allow failure --- .github/workflows/ci-future.yml | 47 +++++++++++++++++++++++++++++++++ .github/workflows/ci.yml | 1 - 2 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/ci-future.yml diff --git a/.github/workflows/ci-future.yml b/.github/workflows/ci-future.yml new file mode 100644 index 00000000..52bd8d0c --- /dev/null +++ b/.github/workflows/ci-future.yml @@ -0,0 +1,47 @@ +name: CI-future +on: + pull_request: + branches: + - master + push: + branches: + - master + tags: '*' +jobs: + test: + name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} + env: + JULIA_NUM_THREADS: 2 + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + version: + - 'nightly' + os: + - ubuntu-latest + arch: + - x64 + steps: + - run: git config --global core.autocrlf false + - uses: actions/checkout@v2 + - uses: julia-actions/setup-julia@v1 + with: + version: ${{ matrix.version }} + arch: ${{ matrix.arch }} + - uses: actions/cache@v1 + env: + cache-name: cache-artifacts + with: + path: ~/.julia/artifacts + key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }} + restore-keys: | + ${{ runner.os }}-test-${{ env.cache-name }}- + ${{ runner.os }}-test- + ${{ runner.os }}- + - uses: julia-actions/julia-buildpkg@v1 + - uses: julia-actions/julia-runtest@v1 + - uses: julia-actions/julia-processcoverage@v1 + - uses: codecov/codecov-action@v1 + with: + file: lcov.info diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4e48e91a..bc8e09b7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,7 +19,6 @@ jobs: version: - '1.0' - '1' # automatically expands to the latest stable 1.x release of Julia - - 'nightly' os: - ubuntu-latest arch: From 8aedf99c12a4314b2843e07048065df0855f7c6e Mon Sep 17 00:00:00 2001 From: Dave Kleinschmidt Date: Wed, 2 Dec 2020 16:10:10 -0500 Subject: [PATCH 09/11] use julia-actions/julia-docdeploy --- .github/workflows/docs.yml | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 74a05fae..910b7f29 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -6,24 +6,14 @@ on: - 'master' tags: '*' pull_request: - jobs: - build: - runs-on: ${{ matrix.os }} - strategy: - matrix: - julia-version: - - '1' # expands to latest 1.x series release... - julia-arch: [x86] - os: [ubuntu-latest] + Documenter: + name: Documentation + runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1.0.0 - - uses: julia-actions/setup-julia@latest - with: - version: ${{ matrix.julia-version }} - - name: Install dependencies - run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()' - - name: Build and deploy + - uses: actions/checkout@v2 + - uses: julia-actions/julia-buildpkg@latest + - uses: julia-actions/julia-docdeploy@latest env: - DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # For authentication with SSH deploy key - run: julia --project=docs/ docs/make.jl + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} From d85f873039eb08f84cee7ef216636d8fa0cfe4dc Mon Sep 17 00:00:00 2001 From: Dave Kleinschmidt Date: Wed, 2 Dec 2020 16:46:36 -0500 Subject: [PATCH 10/11] adjust lr test for 1.6 --- test/statsmodel.jl | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/test/statsmodel.jl b/test/statsmodel.jl index 3c49190d..1fd19ce2 100644 --- a/test/statsmodel.jl +++ b/test/statsmodel.jl @@ -276,13 +276,25 @@ end lrtest(m0, m1)) @test isnan(lr2.pval[1]) @test lr2.pval[2] ≈ 1.2147224767092312e-5 - @test sprint(show, lr2) == """ - Likelihood-ratio test: 2 models fitted on 4 observations - ────────────────────────────────────────────── - DOF ΔDOF Deviance ΔDeviance p(>Chisq) - ────────────────────────────────────────────── - [1] 0 30.0000 - [2] 1 1 10.8600 -19.1400 <1e-4 - ──────────────────────────────────────────────""" -end \ No newline at end of file + # in 1.6, p value printing has changed (JuliaStats/StatsBase.jl#606) + if VERSION > v"1.6.0-DEV" + @test sprint(show, lr2) == """ + Likelihood-ratio test: 2 models fitted on 4 observations + ────────────────────────────────────────────── + DOF ΔDOF Deviance ΔDeviance p(>Chisq) + ────────────────────────────────────────────── + [1] 0 30.0000 + [2] 1 1 10.8600 -19.1400 <1e-04 + ──────────────────────────────────────────────""" + else + @test sprint(show, lr2) == """ + Likelihood-ratio test: 2 models fitted on 4 observations + ────────────────────────────────────────────── + DOF ΔDOF Deviance ΔDeviance p(>Chisq) + ────────────────────────────────────────────── + [1] 0 30.0000 + [2] 1 1 10.8600 -19.1400 <1e-4 + ──────────────────────────────────────────────""" + end +end From 1dfe2260bcf7682c1216ed1840c0d44d6bddfd25 Mon Sep 17 00:00:00 2001 From: Dave Kleinschmidt Date: Wed, 2 Dec 2020 16:46:56 -0500 Subject: [PATCH 11/11] run tests on 32 bit ubuntu for 1.x --- .github/workflows/ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bc8e09b7..75a3d5c2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,6 +23,10 @@ jobs: - ubuntu-latest arch: - x64 + include: + - os: ubuntu-latest + arch: 'x86' + version: '1' steps: - run: git config --global core.autocrlf false - uses: actions/checkout@v2