100 lines
3.2 KiB
YAML
100 lines
3.2 KiB
YAML
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"
|
|
GKSwstype: "100"
|
|
|
|
name: Julia ${{ matrix.version }} - ${{ matrix.os }}
|
|
runs-on: ${{ matrix.os }}
|
|
continue-on-error: ${{ matrix.version == 'nightly' }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
version:
|
|
- '1.5'
|
|
- '1.6'
|
|
- '1'
|
|
- 'nightly'
|
|
os:
|
|
- ubuntu-latest
|
|
- windows-latest
|
|
- macos-latest
|
|
arch:
|
|
- x64
|
|
# - x86
|
|
|
|
steps:
|
|
# Setup environment
|
|
- uses: actions/checkout@v2
|
|
if: "${{matrix.version}} == '1' || (${{matrix.version}} != '1' && ${{matrix.os}} == 'ubuntu-latest')"
|
|
- uses: julia-actions/setup-julia@latest
|
|
if: "${{matrix.version}} == '1' || (${{matrix.version}} != '1' && ${{matrix.os}} == 'ubuntu-latest')"
|
|
with:
|
|
version: ${{ matrix.version }}
|
|
- name: Cache artifacts
|
|
uses: actions/cache@v1
|
|
if: "${{matrix.version}} == '1' || (${{matrix.version}} != '1' && ${{matrix.os}} == 'ubuntu-latest')"
|
|
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 }}-
|
|
|
|
## maybe required if we ever want to run graphical tests for plotly
|
|
# OS Dependencies
|
|
# - name: Ubuntu OS dependencies
|
|
# if: startsWith(matrix.os,'ubuntu')
|
|
# run: |
|
|
# ./test/install_wkhtmltoimage.sh
|
|
|
|
# TESTCMD
|
|
- name: Default TESTCMD
|
|
if: "${{matrix.version}} == '1' || (${{matrix.version}} != '1' && ${{matrix.os}} == 'ubuntu-latest')"
|
|
run: echo "TESTCMD=julia" >> $GITHUB_ENV
|
|
- name: Ubuntu TESTCMD
|
|
if: startsWith(matrix.os,'ubuntu')
|
|
run: echo "TESTCMD=xvfb-run --auto-servernum julia" >> $GITHUB_ENV
|
|
|
|
# Julia Dependencies
|
|
- name: Install Julia dependencies
|
|
uses: julia-actions/julia-buildpkg@latest
|
|
if: "${{matrix.version}} == '1' || (${{matrix.version}} != '1' && ${{matrix.os}} == 'ubuntu-latest')"
|
|
|
|
# Run tests
|
|
- name: Run Graphical test
|
|
if: "${{matrix.version}} == '1' || (${{matrix.version}} != '1' && ${{matrix.os}} == 'ubuntu-latest')"
|
|
run: |
|
|
$TESTCMD --project -e 'using Pkg; Pkg.test(coverage=true)'
|
|
$TESTCMD -e 'using Pkg; Pkg.activate(tempdir()); Pkg.develop(path=abspath(".")); Pkg.add("StatsPlots"); Pkg.test("StatsPlots")'
|
|
$TESTCMD -e 'using Pkg; Pkg.activate(tempdir()); Pkg.develop(path=abspath(".")); Pkg.add("GraphRecipes"); Pkg.test("GraphRecipes")'
|
|
|
|
# Codecov
|
|
- uses: julia-actions/julia-processcoverage@v1
|
|
if: "${{matrix.version}} == '1'"
|
|
- uses: codecov/codecov-action@v2
|
|
if: "${{matrix.version}} == '1'"
|
|
with:
|
|
file: lcov.info
|
|
|
|
Skip:
|
|
if: "contains(github.event.head_commit.message, '[skip ci]')"
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Skip CI 🚫
|
|
run: echo skip ci
|