-
Notifications
You must be signed in to change notification settings - Fork 111
104 lines (103 loc) · 4.46 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
name: CI
on:
pull_request:
push:
branches:
- master
tags: '*'
jobs:
test:
name: Install & test Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.allow_failure }}
strategy:
fail-fast: false
matrix:
version:
- '1.6' # LTS
- '1.9' # parsing errors branch on 1.10, so test the last pre-1.10 version
- '1' # current stable
- 'pre' # next release, if available
os:
- ubuntu-latest
- macOS-latest
- windows-latest
arch:
- x64
allow_failure: [false]
include:
- version: 'nightly'
os: ubuntu-latest
arch: x64
allow_failure: true
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@latest
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
show-versioninfo: ${{ matrix.version == 'nightly' }}
- uses: julia-actions/cache@v2
- uses: julia-actions/julia-buildpkg@latest
# Revise's tests need significant customization
# Populate the precompile cache with an extraneous file, to catch issues like in #460
- name: populate_compiled
if: ${{ matrix.os != 'windows-latest' }}
run: julia -e 'include(joinpath("test", "populate_compiled.jl"))'
- uses: julia-actions/julia-runtest@latest
- name: filewatching
if: ${{ matrix.os == 'ubuntu-latest' && matrix.version != '1.0' }}
run: julia --project -e 'using Pkg; Pkg.build(); Pkg.test(; test_args=["REVISE_TESTS_WATCH_FILES"], coverage=true)'
- name: extra tests
if: ${{ matrix.os != 'windows-latest' && matrix.version != '1.0' }}
run: |
echo $TERM
# Tests for when using polling
echo "Polling"
julia --project --code-coverage=user -e '
ENV["JULIA_REVISE_POLL"]="1"
using Pkg, Revise
include(joinpath(dirname(pathof(Revise)), "..", "test", "polling.jl"))
'
# The REPL wasn't initialized, so the "Methods at REPL" tests didn't run. Pick those up now.
echo "Methods at REPL"
TERM="xterm" julia --project --code-coverage=user -e '
using InteractiveUtils, REPL, Revise
t = @async(
VERSION >= v"1.12.0-DEV.612" ? Base.run_main_repl(true, true, :no, true) :
VERSION >= v"1.11.0-DEV.222" ? Base.run_main_repl(true, true, :no, true, false) :
Base.run_main_repl(true, true, false, true, false))
isdefined(Base, :errormonitor) && Base.errormonitor(t)
while (!isdefined(Base, :active_repl_backend) || isnothing(Base.active_repl_backend)) sleep(0.1) end
pushfirst!(Base.active_repl_backend.ast_transforms, Revise.revise_first)
include(joinpath("test", "runtests.jl"))
if Base.VERSION.major == 1 && Base.VERSION.minor >= 9
REPL.eval_user_input(:(exit()), Base.active_repl_backend, Main)
else
REPL.eval_user_input(:(exit()), Base.active_repl_backend)
end' "Methods at REPL"
# We also need to pick up the Git tests, but for that we need to `dev` the package
echo "Git tests"
julia --code-coverage=user -e '
using Pkg; Pkg.develop(PackageSpec(path="."))
include(joinpath("test", "runtests.jl"))
' "Git"
# Check #664
echo "Test #664"
TERM="xterm" julia --startup-file=no --project test/start_late.jl
# Check #697
echo "Test #697"
dn=$(mktemp -d)
path=$(julia -e '(!isempty(VERSION.prerelease) && VERSION.prerelease[1] == "DEV") ? println(Base.GIT_VERSION_INFO.commit) : println("refs/tags/v",VERSION)')
curl -s -L https://github.com/JuliaLang/julia/archive/$path.tar.gz --output - | tar -xz -C $dn
julia --project test/juliadir.jl "$dn/julia-$ver"
# # Running out of inotify storage (see #26)
# - name: inotify
# if: ${{ matrix.os == 'ubuntu-latest' }}
# run: echo 4 | sudo tee -a /proc/sys/fs/inotify/max_user_watches; julia --project --code-coverage=user -e 'using Pkg, Revise; cd(joinpath(dirname(pathof(Revise)), "..", "test")); include("inotify.jl")'
- uses: julia-actions/julia-processcoverage@latest
- uses: codecov/codecov-action@v4
with:
file: lcov.info
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true