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 new file mode 100644 index 00000000..75a3d5c2 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,52 @@ +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 + os: + - ubuntu-latest + arch: + - x64 + include: + - os: ubuntu-latest + arch: 'x86' + version: '1' + 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/docs.yml b/.github/workflows/docs.yml index f15477f5..910b7f29 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -6,23 +6,14 @@ on: - 'master' tags: '*' pull_request: - jobs: - build: - runs-on: ${{ matrix.os }} - strategy: - matrix: - julia-version: [1.3.0] - 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 }} 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())' 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 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