-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (71 loc) · 2.7 KB
/
CI.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: CI
on:
pull_request:
branches:
- main
push:
branches:
- main
tags: '*'
jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
version:
- '1.6' # Replace this with the minimum Julia version that your package supports. E.g. if your package requires Julia 1.5 or higher, change this to '1.5'.
- '1' # Leave this line unchanged. '1' will automatically expand to the latest stable 1.x release of Julia.
os:
- ubuntu-latest
arch:
- x64
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: julia-actions/cache@v1
- run: sudo apt-get update && sudo apt-get install -y xorg-dev mesa-utils xvfb libgl1 freeglut3-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev
- name: Install Julia dependencies
shell: julia --project=ArtefactModelling {0}
run: |
using Pkg;
pkg"dev ."
- name: Run the tests
run: >
DISPLAY=:0 xvfb-run -s '-screen 0 1024x768x24' julia --color=yes --project=ArtefactModelling -e 'using Pkg; Pkg.test("ArtefactModelling", coverage=true)'
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v2
with:
file: lcov.info
docs:
name: Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
with:
version: 1
- uses: julia-actions/cache@v1
- run: sudo apt-get update && sudo apt-get install -y xorg-dev mesa-utils xvfb libgl1 freeglut3-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev
- name: Install Julia dependencies
shell: julia --project=ArtefactModelling {0}
run: |
using Pkg;
pkg"dev ."
# might be better to do docs manually due to GLMakie issues
# this will avoid errors though...
# - uses: julia-actions/julia-docdeploy@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
- name: Run doctest
run: >
DISPLAY=:0 xvfb-run -s '-screen 0 1024x768x24' julia --color=yes --project=ArtefactModelling -e '
using Documenter: DocMeta, doctest
using ArtefactModelling
DocMeta.setdocmeta!(ArtefactModelling, :DocTestSetup, :(using ArtefactModelling); recursive=true)
doctest(ArtefactModelling)'