From f18e50c8ed060e60e3ad17821811693bee8470cd Mon Sep 17 00:00:00 2001 From: Milan Bouchet-Valat Date: Sun, 3 Jan 2021 18:28:41 +0100 Subject: [PATCH] Add GitHub action for CI --- .github/workflows/ci.yml | 65 ++++++++++++++++++++++++++++++++++++++++ README.md | 5 +--- 2 files changed, 66 insertions(+), 4 deletions(-) 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..0e77501f --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,65 @@ +name: CI +on: + push: + branches: [master] + tags: ["*"] + pull_request: +jobs: + test: + name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + version: + - '1' # automatically expands to the latest stable 1.x release of Julia + - 'nightly' + os: + - ubuntu-latest + - macOS-latest + - windows-latest + arch: + - x64 + - x86 + exclude: + - os: macOS-latest + arch: x86 + steps: + - 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 + docs: + name: Documentation + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: julia-actions/setup-julia@v1 + with: + version: '1' + - run: | + julia --project=docs -e ' + using Pkg + Pkg.develop(PackageSpec(path=pwd())) + Pkg.instantiate()' + - run: julia --project=docs docs/make.jl + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} diff --git a/README.md b/README.md index db50bb9d..85cfe436 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Statistics.jl -[![Travis CI Build Status][travis-img]][travis-url] +[![Build status](https://github.com/JuliaLang/Statistics.jl/workflows/CI/badge.svg)]((https://github.com/JuliaLang/Statistics.jl/actions?query=workflow%3ACI+branch%3Amaster)) Development repository for the Statistics standard library (stdlib) that ships with Julia. @@ -14,6 +14,3 @@ If you want to develop this package, do the following steps: - To test your changes, simply do `include("test/runtests.jl")`. If you need to build Julia from source with a git checkout of Statistics, then instead use `make DEPS_GIT=Statistics` when building Julia. The `Statistics` repo is in `stdlib/Statistics`, and created initially with a detached `HEAD`. If you're doing this from a pre-existing Julia repository, you may need to `make clean` beforehand. - -[travis-img]: https://travis-ci.com/JuliaLang/Statistics.jl.svg?branch=master -[travis-url]: https://travis-ci.com/JuliaLang/Statistics.jl