From 54d4e443501032b3b3bf8a8c877c2a04b7dc68fa Mon Sep 17 00:00:00 2001 From: Mirko Bunse Date: Tue, 6 Apr 2021 13:24:28 +0200 Subject: [PATCH 1/6] Switch to GitHub actions for CI --- .github/workflows/CI.yml | 60 ++++++++++++++++++++++++++++++++++++++++ .travis.yml | 16 ----------- README.md | 3 +- 3 files changed, 61 insertions(+), 18 deletions(-) create mode 100644 .github/workflows/CI.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml new file mode 100644 index 0000000..0a6bb04 --- /dev/null +++ b/.github/workflows/CI.yml @@ -0,0 +1,60 @@ +name: CI + +# Run on master, tags, or any pull request +on: + push: + branches: [master] + tags: ["*"] + pull_request: + +jobs: + + # unit tests with coverage + test: + name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + version: + - "1.0" # LTS + - "1" # Latest Release + os: + - ubuntu-latest + arch: + - x64 + steps: + + # check out the project and install Julia + - uses: actions/checkout@v2 + - uses: julia-actions/setup-julia@v1 + with: + version: ${{ matrix.version }} + arch: ${{ matrix.arch }} + + # using a cache can speed up execution times + - uses: actions/cache@v2 + env: + cache-name: cache-artifacts + with: + path: ~/.julia/artifacts + key: ${{ runner.os }}-${{ matrix.arch }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }} + restore-keys: | + ${{ runner.os }}-${{ matrix.arch }}-test-${{ env.cache-name }}- + ${{ runner.os }}-${{ matrix.arch }}-test- + ${{ runner.os }}-${{ matrix.arch }}- + ${{ runner.os }}- + + # TexLive installation + - name: Install TexLive + run: sudo apt-get install pdf2svg texlive-latex-base texlive-binaries texlive-pictures texlive-latex-extra texlive-luatex + + # build the depencies, run the tests, and upload coverage results + - uses: julia-actions/julia-buildpkg@latest + - run: | + git config --global user.name Tester + git config --global user.email te@st.er + - name: Run Tests + uses: julia-actions/julia-runtest@latest + - uses: julia-actions/julia-processcoverage@v1 + - uses: julia-actions/julia-uploadcoveralls@v1 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 505ae70..0000000 --- a/.travis.yml +++ /dev/null @@ -1,16 +0,0 @@ -language: julia -sudo: required -dist: trusty -coveralls: true -julia: - - 1.0 - - 1.6 -notifications: - email: false -before_install: - - sudo apt-get -qq update - - sudo apt-get install -y pdf2svg - - sudo apt-get install -y texlive-latex-base - - sudo apt-get install -y texlive-binaries - - sudo apt-get install -y texlive-pictures - - sudo apt-get install -y texlive-latex-extra diff --git a/README.md b/README.md index 93a7885..1fe111d 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,6 @@ # PGFPlots - -[![Build Status](https://travis-ci.org/JuliaTeX/PGFPlots.jl.svg)](https://travis-ci.org/JuliaTeX/PGFPlots.jl) +[![Build Status](https://github.com/JuliaTeX/PGFPlots.jl/workflows/CI/badge.svg)](https://github.com/JuliaTeX/PGFPlots.jl/actions) [![Coverage Status](https://coveralls.io/repos/github/JuliaTeX/PGFPlots.jl/badge.svg?branch=master)](https://coveralls.io/github/JuliaTeX/PGFPlots.jl?branch=master) This library uses the LaTeX package [pgfplots](http://ctan.org/pkg/pgfplots) to produce plots. It integrates with IJulia, outputting SVG images to the notebook. From 6dc60418ee70e82e5ed9aa9c5f32dc569983848e Mon Sep 17 00:00:00 2001 From: Robert Moss Date: Wed, 7 Apr 2021 19:37:38 -0700 Subject: [PATCH 2/6] Added COVERALLS_TOKEN to CI.yml --- .github/workflows/CI.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 0a6bb04..81eb99b 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -55,6 +55,8 @@ jobs: git config --global user.name Tester git config --global user.email te@st.er - name: Run Tests + env: + COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} uses: julia-actions/julia-runtest@latest - uses: julia-actions/julia-processcoverage@v1 - uses: julia-actions/julia-uploadcoveralls@v1 From cc5cfabb95cf4663a8952f6f364fac35f851bd11 Mon Sep 17 00:00:00 2001 From: Robert Moss Date: Wed, 7 Apr 2021 19:43:22 -0700 Subject: [PATCH 3/6] Move token under Coveralls processing Github action --- .github/workflows/CI.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 81eb99b..567ee1c 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -55,8 +55,9 @@ jobs: git config --global user.name Tester git config --global user.email te@st.er - name: Run Tests + uses: julia-actions/julia-runtest@latest + - name: Process Coverage env: COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} - uses: julia-actions/julia-runtest@latest - - uses: julia-actions/julia-processcoverage@v1 + uses: julia-actions/julia-processcoverage@v1 - uses: julia-actions/julia-uploadcoveralls@v1 From 90ef626f130c2b416c7deb405fdea07c79df1988 Mon Sep 17 00:00:00 2001 From: Robert Moss Date: Wed, 7 Apr 2021 19:48:00 -0700 Subject: [PATCH 4/6] Coveralls: moved under "upload" Github action --- .github/workflows/CI.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 567ee1c..904a4f7 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -56,8 +56,8 @@ jobs: git config --global user.email te@st.er - name: Run Tests uses: julia-actions/julia-runtest@latest - - name: Process Coverage + - uses: julia-actions/julia-processcoverage@v1 + - name: Upload Coverage env: COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} - uses: julia-actions/julia-processcoverage@v1 - - uses: julia-actions/julia-uploadcoveralls@v1 + uses: julia-actions/julia-uploadcoveralls@v1 From 665f75dc221483f6b062e5baa2d5b3170dba7b80 Mon Sep 17 00:00:00 2001 From: Robert Moss Date: Wed, 7 Apr 2021 19:58:02 -0700 Subject: [PATCH 5/6] Changed to secrets.COVERALLS_TOKEN --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 904a4f7..894c60a 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -59,5 +59,5 @@ jobs: - uses: julia-actions/julia-processcoverage@v1 - name: Upload Coverage env: - COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} + COVERALLS_TOKEN: ${{ secrets.COVERALLS_TOKEN }} uses: julia-actions/julia-uploadcoveralls@v1 From 518de9cd4b4a03244b0dbae3b47b73c35d1f1dca Mon Sep 17 00:00:00 2001 From: Robert Moss Date: Wed, 7 Apr 2021 21:40:06 -0700 Subject: [PATCH 6/6] Added 'continue-on-error' due to julia-uploadcoveralls not working for PRs --- .github/workflows/CI.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 894c60a..011351d 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -58,6 +58,7 @@ jobs: uses: julia-actions/julia-runtest@latest - uses: julia-actions/julia-processcoverage@v1 - name: Upload Coverage + uses: julia-actions/julia-uploadcoveralls@v1 env: COVERALLS_TOKEN: ${{ secrets.COVERALLS_TOKEN }} - uses: julia-actions/julia-uploadcoveralls@v1 + continue-on-error: true