From 282d80a758d2178579fd822c631816aea7eca86c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciar=C3=A1n=20O=27Mara?= Date: Fri, 17 Jan 2020 16:38:16 +1100 Subject: [PATCH] Continuous Integration --- .codecov.yml | 1 + .github/workflows/UnitTests.yml | 22 ++++++++++++++++++++++ ci_prep.jl | 3 +++ coverage/Project.toml | 2 ++ coverage/coverage.jl | 11 +++++++++++ 5 files changed, 39 insertions(+) create mode 100644 .codecov.yml create mode 100644 .github/workflows/UnitTests.yml create mode 100644 ci_prep.jl create mode 100644 coverage/Project.toml create mode 100644 coverage/coverage.jl diff --git a/.codecov.yml b/.codecov.yml new file mode 100644 index 0000000..69cb760 --- /dev/null +++ b/.codecov.yml @@ -0,0 +1 @@ +comment: false diff --git a/.github/workflows/UnitTests.yml b/.github/workflows/UnitTests.yml new file mode 100644 index 0000000..cbaf083 --- /dev/null +++ b/.github/workflows/UnitTests.yml @@ -0,0 +1,22 @@ +name: Unit tests + +on: [push, pull_request] + +jobs: + test: + runs-on: ${{ matrix.os }} + strategy: + matrix: + julia-version: ['1.1', '1.2', '1.3'] + julia-arch: [x64] + os: [ubuntu-latest, windows-latest, macOS-latest] + + steps: + - uses: actions/checkout@v1.0.0 + - uses: julia-actions/setup-julia@v1 + with: + version: ${{ matrix.julia-version }} + arch: ${{ matrix.julia-arch }} + - name: Install dependencies + run: julia ci_prep.jl + - uses: julia-actions/julia-runtest@master diff --git a/ci_prep.jl b/ci_prep.jl new file mode 100644 index 0000000..f3a7535 --- /dev/null +++ b/ci_prep.jl @@ -0,0 +1,3 @@ +using Pkg.Registry +Registry.add(Registry.RegistrySpec(url = "https://github.com/BioJulia/BioJuliaRegistry.git")) +Registry.add(Registry.RegistrySpec(url = "https://github.com/JuliaRegistries/General.git")) diff --git a/coverage/Project.toml b/coverage/Project.toml new file mode 100644 index 0000000..4fbdc47 --- /dev/null +++ b/coverage/Project.toml @@ -0,0 +1,2 @@ +[deps] +Coverage = "a2441757-f6aa-5fb2-8edb-039e3f45d037" diff --git a/coverage/coverage.jl b/coverage/coverage.jl new file mode 100644 index 0000000..3d33ed9 --- /dev/null +++ b/coverage/coverage.jl @@ -0,0 +1,11 @@ +get(ENV, "TRAVIS_OS_NAME", "") == "linux" || exit() +get(ENV, "TRAVIS_JULIA_VERSION", "") == "1.3" || exit() + +using Pkg +Pkg.instantiate() + +using Coverage + +cd(joinpath(@__DIR__, "..")) do + Codecov.submit(Codecov.process_folder()) +end