-
Notifications
You must be signed in to change notification settings - Fork 1
60 lines (54 loc) · 1.81 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
name: CI
on:
push:
branches:
- main
tags: ['*']
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
version:
- '1.9'
os:
- ubuntu-latest
arch:
- x64
steps:
- uses: actions/checkout@v3
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- name: Cache Julia packages
uses: actions/cache@v2
with:
path: ~/.julia
key: ${{ runner.os }}-julia-${{ matrix.version }}-${{ hashFiles('**/Project.toml', '**/Manifest.toml') }}
restore-keys: |
${{ runner.os }}-julia-${{ matrix.version }}-
${{ runner.os }}-julia-
- name: Install Xvfb
run: sudo apt-get install -y xvfb
- name: Create script for tests with Xvfb
run: |
echo '#!/bin/bash' > run_tests.sh
echo 'export JULIA_PKG_SERVER=""' >> run_tests.sh
echo 'export JULIA_NUM_THREADS=1' >> run_tests.sh
echo 'julia --project --code-coverage=user -e "using Pkg; Pkg.test()"' >> run_tests.sh
chmod +x run_tests.sh
- name: Run tests with Xvfb
run: xvfb-run --auto-servernum --server-args="-screen 0 1024x768x24" ./run_tests.sh
- name: Process coverage with Coverage.jl
run: julia --project -e 'using Coverage; LCOV.writefile("lcov.info", process_folder())'
- uses: codecov/codecov-action@v3
with:
files: lcov.info