From 2c60207872948d5f658590fe4a9705792e355bf5 Mon Sep 17 00:00:00 2001 From: Johnny Chen Date: Wed, 26 May 2021 14:45:45 +0800 Subject: [PATCH 1/3] switch CI to github actions --- .github/workflows/UnitTest.yml | 61 ++++++++++++++++++++++++++++++++++ .travis.yml | 36 -------------------- README.md | 16 ++++++++- 3 files changed, 76 insertions(+), 37 deletions(-) create mode 100644 .github/workflows/UnitTest.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/UnitTest.yml b/.github/workflows/UnitTest.yml new file mode 100644 index 0000000..98a2018 --- /dev/null +++ b/.github/workflows/UnitTest.yml @@ -0,0 +1,61 @@ +name: Unit test + +on: + create: + tags: + push: + branches: + - master + paths-ignore: + - 'LICENSE.md' + - 'README.md' + - '.github/workflows/TagBot.yml' + pull_request: + paths-ignore: + - 'LICENSE.md' + - 'README.md' + - '.github/workflows/TagBot.yml' + +jobs: + test: + runs-on: ${{ matrix.os }} + strategy: + # allow-failure is not supported yet + # https://github.com/actions/toolkit/issues/399 + fail-fast: false + matrix: + julia-version: ['1.0', '1', 'nightly'] + os: [ubuntu-latest, windows-latest, macOS-latest] + julia-arch: [x64] + # only test one 32-bit job + include: + - os: ubuntu-latest + julia-version: '1' + julia-arch: x86 + + steps: + - uses: actions/checkout@v1.0.0 + - name: "Set up Julia" + uses: julia-actions/setup-julia@v1 + with: + version: ${{ matrix.julia-version }} + arch: ${{ matrix.julia-arch }} + + - name: Cache artifacts + 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 }}- + - name: "Unit Test" + uses: julia-actions/julia-runtest@master + + - uses: julia-actions/julia-processcoverage@v1 + - uses: codecov/codecov-action@v1 + with: + file: lcov.info diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 51e8dd8..0000000 --- a/.travis.yml +++ /dev/null @@ -1,36 +0,0 @@ -language: julia -os: - - linux - - osx -julia: - - 1.0 - - 1.1 - - 1.2 - - 1 - - nightly -notifications: - email: false -matrix: - allow_failures: - # - julia: nightly - -# script: -# # Default Travis script uses the more or less the following with Project.toml -# - julia -e 'using Pkg; Pkg.build(); Pkg.test(coverage=true)' - -jobs: - include: - - stage: "Documentation" - julia: 1.1 - os: linux - script: - - julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); - Pkg.instantiate()' - - julia --project=docs/ docs/make.jl - after_success: skip - -after_success: -# - julia -e 'Pkg.add("Unitful")' ? - - if [ $TRAVIS_JULIA_VERSION = "1.1" ] && [ $TRAVIS_OS_NAME = "linux" ]; then - julia -e 'using Pkg; Pkg.add("Coverage"); using Coverage; Coveralls.submit(process_folder())'; - fi diff --git a/README.md b/README.md index 69869df..7dd9e40 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ # AxisArrays.jl -[![Build Status](https://travis-ci.org/JuliaArrays/AxisArrays.jl.svg?branch=master)](https://travis-ci.org/JuliaArrays/AxisArrays.jl) [![Coverage Status](https://coveralls.io/repos/github/JuliaArrays/AxisArrays.jl/badge.svg?branch=master)](https://coveralls.io/github/JuliaArrays/AxisArrays.jl?branch=master) +[![][action-img]][action-url] +[![][pkgeval-img]][pkgeval-url] +[![][codecov-img]][codecov-url] This package for the Julia language provides an array type (the `AxisArray`) that knows about its dimension names and axis values. This allows for indexing by name without incurring any runtime overhead. @@ -272,3 +274,15 @@ meanz = sumz/Itotal ``` The intention is that all of these operations are just as efficient as they would be if you used traditional position-based indexing with all the inherent assumptions about the storage order of `B`. + + + + +[pkgeval-img]: https://juliaci.github.io/NanosoldierReports/pkgeval_badges/A/AxisArrays.svg +[pkgeval-url]: https://juliaci.github.io/NanosoldierReports/pkgeval_badges/report.html + +[action-img]: https://github.com/JuliaArrays/AxisArrays.jl/workflows/Unit%20test/badge.svg +[action-url]: https://github.com/JuliaArrays/AxisArrays.jl/actions + +[codecov-img]: https://codecov.io/github/JuliaArrays/AxisArrays.jl/coverage.svg?branch=master +[codecov-url]: https://codecov.io/gh/JuliaArrays/AxisArrays.jl From 78e62292c8e2ed36ecacffabd6a4bcdf8faa648e Mon Sep 17 00:00:00 2001 From: Johnny Chen Date: Sat, 24 Jul 2021 22:12:07 +0800 Subject: [PATCH 2/3] Update .github/workflows/UnitTest.yml Co-authored-by: Rik Huijzer --- .github/workflows/UnitTest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/UnitTest.yml b/.github/workflows/UnitTest.yml index 98a2018..44ae021 100644 --- a/.github/workflows/UnitTest.yml +++ b/.github/workflows/UnitTest.yml @@ -34,7 +34,7 @@ jobs: julia-arch: x86 steps: - - uses: actions/checkout@v1.0.0 + - uses: actions/checkout@v2 - name: "Set up Julia" uses: julia-actions/setup-julia@v1 with: From ae4bfc465f619ac1a89f50210f294a30ef77d32d Mon Sep 17 00:00:00 2001 From: Johnny Chen Date: Sat, 24 Jul 2021 22:12:15 +0800 Subject: [PATCH 3/3] Update .github/workflows/UnitTest.yml Co-authored-by: Rik Huijzer --- .github/workflows/UnitTest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/UnitTest.yml b/.github/workflows/UnitTest.yml index 44ae021..04e8fed 100644 --- a/.github/workflows/UnitTest.yml +++ b/.github/workflows/UnitTest.yml @@ -53,7 +53,7 @@ jobs: ${{ runner.os }}-test- ${{ runner.os }}- - name: "Unit Test" - uses: julia-actions/julia-runtest@master + uses: julia-actions/julia-runtest@v1 - uses: julia-actions/julia-processcoverage@v1 - uses: codecov/codecov-action@v1