From 24372cd6ce6f5b65ad8b16865f3d93fee760b277 Mon Sep 17 00:00:00 2001 From: Johnny Chen Date: Sat, 4 Jul 2020 18:58:22 +0800 Subject: [PATCH 1/4] Use Github Actions for CI Changes: * remove appveyor (and also windows 32bit) * leave travis for coverage report * caching artifacts dir in CI --- .github/workflows/UnitTest.yml | 45 ++++++++++++++++++++++++++++++++++ .travis.yml | 16 +++++------- README.md | 2 +- appveyor.yml | 43 -------------------------------- 4 files changed, 52 insertions(+), 54 deletions(-) create mode 100644 .github/workflows/UnitTest.yml delete mode 100644 appveyor.yml diff --git a/.github/workflows/UnitTest.yml b/.github/workflows/UnitTest.yml new file mode 100644 index 0000000..ba079b0 --- /dev/null +++ b/.github/workflows/UnitTest.yml @@ -0,0 +1,45 @@ +name: Unit test + +on: + create: + tags: + push: + branches: + - master + pull_request: + schedule: + - cron: '20 00 1 * *' + +jobs: + test: + runs-on: ${{ matrix.os }} + strategy: + matrix: + julia-version: ['1.0', '1', 'nightly'] + os: [ubuntu-latest, windows-latest, macOS-latest] + + steps: + - uses: actions/checkout@v1.0.0 + - name: "Set up Julia" + uses: julia-actions/setup-julia@v1 + with: + version: ${{ matrix.julia-version }} + + - 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 + + # Unless tokenless upload is enabled, we can only submit coverage via + # environment variable. But PRs from other fork can't do that. + # See issue: https://github.com/julia-actions/julia-uploadcodecov/issues/1 diff --git a/.travis.yml b/.travis.yml index 07e278d..8b19825 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,17 +1,13 @@ -# Documentation: http://docs.travis-ci.com/user/languages/julia/ +# Until https://github.com/julia-actions/julia-uploadcodecov/issues/1 get fixed +# submit coverage report via travis language: julia os: - linux - - osx julia: - 1.0 - - 1.3 - - nightly notifications: email: false -# uncomment the following lines to override the default test script -#script: -# - if [[ -a .git/shallow ]]; then git fetch --unshallow; fi -# - julia --check-bounds=yes -e 'Pkg.clone(pwd()); Pkg.build("ColorVectorSpace"); Pkg.test("ColorVectorSpace"; coverage=true)' -after_success: -- julia -e 'cd(Pkg.dir("ColorVectorSpace")); Pkg.add("Coverage"); using Coverage; Codecov.submit(process_folder())' +cache: + directories: + - $HOME/.julia/artifacts +codecov: true diff --git a/README.md b/README.md index fcbeab5..c1bbf1f 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # ColorVectorSpace -[![Build Status](https://travis-ci.org/JuliaGraphics/ColorVectorSpace.jl.svg?branch=master)](https://travis-ci.org/JuliaGraphics/ColorVectorSpace.jl) +[![Build Status](https://github.com/JuliaGraphics/ColorVectorSpace.jl/workflows/Unit%20test/badge.svg)](https://github.com/JuliaGraphics/ColorVectorSpace.jl/actions) [![codecov.io](http://codecov.io/github/JuliaGraphics/ColorVectorSpace.jl/coverage.svg?branch=master)](http://codecov.io/github/JuliaGraphics/ColorVectorSpace.jl?branch=master) This package is an add-on to [ColorTypes](https://github.com/JuliaGraphics/ColorTypes.jl), and provides fast diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index d6d8cd1..0000000 --- a/appveyor.yml +++ /dev/null @@ -1,43 +0,0 @@ -environment: - matrix: - - julia_version: 1.0 - - julia_version: 1 - - julia_version: nightly - -platform: - - x86 # 32-bit - - x64 # 64-bit - -# # Uncomment the following lines to allow failures on nightly julia -# # (tests will run but not make your overall status red) -# matrix: -# allow_failures: -# - julia_version: nightly - -branches: - only: - - master - - /release-.*/ - -notifications: - - provider: Email - on_build_success: false - on_build_failure: false - on_build_status_changed: false - -install: - - ps: iex ((new-object net.webclient).DownloadString("https://raw.githubusercontent.com/JuliaCI/Appveyor.jl/version-1/bin/install.ps1")) - -build_script: - - echo "%JL_BUILD_SCRIPT%" - - C:\julia\bin\julia -e "%JL_BUILD_SCRIPT%" - -test_script: - - echo "%JL_TEST_SCRIPT%" - - C:\julia\bin\julia -e "%JL_TEST_SCRIPT%" - -# # Uncomment to support code coverage upload. Should only be enabled for packages -# # which would have coverage gaps without running on Windows -# on_success: -# - echo "%JL_CODECOV_SCRIPT%" -# - C:\julia\bin\julia -e "%JL_CODECOV_SCRIPT%" From 375af913c2b2b34bd652afc94cebf28a5d872f53 Mon Sep 17 00:00:00 2001 From: Johnny Chen Date: Sat, 4 Jul 2020 19:00:47 +0800 Subject: [PATCH 2/4] ignore manifest --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 8c960ec..97e6a6f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ *.jl.cov *.jl.*.cov *.jl.mem +/Manifest.toml From b5751b1541cb4e0e986808ec817fcdb0a31dfb0a Mon Sep 17 00:00:00 2001 From: Johnny Chen Date: Thu, 16 Jul 2020 13:09:31 +0800 Subject: [PATCH 3/4] move code coverage report to Github Action --- .github/workflows/UnitTest.yml | 7 ++++--- .travis.yml | 13 ------------- 2 files changed, 4 insertions(+), 16 deletions(-) delete mode 100644 .travis.yml diff --git a/.github/workflows/UnitTest.yml b/.github/workflows/UnitTest.yml index ba079b0..20130cb 100644 --- a/.github/workflows/UnitTest.yml +++ b/.github/workflows/UnitTest.yml @@ -40,6 +40,7 @@ jobs: - name: "Unit Test" uses: julia-actions/julia-runtest@master - # Unless tokenless upload is enabled, we can only submit coverage via - # environment variable. But PRs from other fork can't do that. - # See issue: https://github.com/julia-actions/julia-uploadcodecov/issues/1 + - 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 8b19825..0000000 --- a/.travis.yml +++ /dev/null @@ -1,13 +0,0 @@ -# Until https://github.com/julia-actions/julia-uploadcodecov/issues/1 get fixed -# submit coverage report via travis -language: julia -os: - - linux -julia: - - 1.0 -notifications: - email: false -cache: - directories: - - $HOME/.julia/artifacts -codecov: true From 81d1f1a527324790697e59899fe7fcfb2ac6814b Mon Sep 17 00:00:00 2001 From: Johnny Chen Date: Thu, 10 Sep 2020 13:54:42 +0800 Subject: [PATCH 4/4] disable fail-fast and update checkout action version --- .github/workflows/UnitTest.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/UnitTest.yml b/.github/workflows/UnitTest.yml index 20130cb..ae7ea42 100644 --- a/.github/workflows/UnitTest.yml +++ b/.github/workflows/UnitTest.yml @@ -14,12 +14,13 @@ jobs: test: runs-on: ${{ matrix.os }} strategy: + fail-fast: false matrix: julia-version: ['1.0', '1', 'nightly'] os: [ubuntu-latest, windows-latest, macOS-latest] steps: - - uses: actions/checkout@v1.0.0 + - uses: actions/checkout@2 - name: "Set up Julia" uses: julia-actions/setup-julia@v1 with: