From f5f4128e3037e0d0dec50ddd0b0521c393aa86a2 Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Sat, 30 May 2020 20:41:23 -0500 Subject: [PATCH] Add ci.yml --- .github/workflows/ci.yml | 86 ++++++++++++++++++++++++++++++++++++++++ README.md | 2 + 2 files changed, 88 insertions(+) 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..3be2e5c8 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,86 @@ +name: ci + +on: + push: + pull_request: + +defaults: + run: + shell: bash + +jobs: + CI: + if: "!contains(github.event.head_commit.message, '[skip ci]')" + + env: + GKS_ENCODING: "utf8" + + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + version: + - 'nightly' + - '1' + - '1.0' + os: + - ubuntu-latest + - windows-latest + - macos-latest + arch: + - x64 + # - x32 + steps: + + # Setup environment + - uses: actions/checkout@v2 + - uses: julia-actions/setup-julia@latest + 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 }}- + + # OS Dependencies + # - name: Ubuntu OS dependencies + # if: startsWith(matrix.os,'ubuntu') + # run: | + # ./test/install_wkhtmltoimage.sh + + # at-spi2-core, libgtk-3-dev, libgtk-3-0, and xvfb are already installed: https://github.com/actions/virtual-environments/blob/master/images/linux/scripts/installers/basic.sh + + + # TESTCMD + - name: Default TESTCMD + run: echo ::set-env name=TESTCMD::"julia" + - name: Ubuntu TESTCMD + if: startsWith(matrix.os,'ubuntu') + run: echo ::set-env name=TESTCMD::"xvfb-run julia" + + # Julia Deoendencies + - name: Install Julia dependencies + uses: julia-actions/julia-buildpkg@latest + + # Run tests + - name: Run Graphical test + run: $TESTCMD --project -e 'using Pkg; Pkg.test(coverage=true);' + + - name: Codecov + uses: julia-actions/julia-uploadcodecov@latest + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + + Skip: + if: "contains(github.event.head_commit.message, '[skip ci]')" + runs-on: ubuntu-latest + steps: + - name: Skip CI 🚫 + run: echo skip ci diff --git a/README.md b/README.md index 1e6cef98..fc44c5f5 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # Plots +![GitHub Actions CI](https://github.com/JuliaPlots/Plots.jl/workflows/ci/badge.svg) + [travis-img]: https://img.shields.io/travis/JuliaPlots/Plots.jl?logo=travis [travis-url]: https://travis-ci.org/JuliaPlots/Plots.jl