4
4
pull_request :
5
5
push :
6
6
branches :
7
- -master
7
+ - master
8
8
schedule :
9
9
# Prime the caches every Monday
10
10
- cron : 0 1 * * MON
@@ -17,22 +17,19 @@ jobs:
17
17
fail-fast : false
18
18
matrix :
19
19
os :
20
- - macos-latest
21
20
- ubuntu-latest
22
- - windows-latest
23
21
ocaml-compiler :
24
- - 4.14.x
25
- - 5.0.x
26
- - 5.1.x
27
- exclude :
28
- - os : windows-latest
29
- ocaml-compiler : 5.0.x
30
- - os : windows-latest
31
- ocaml-compiler : 5.1.x
22
+ - " 4.14"
23
+ - " 5.0"
24
+ - " 5.1"
25
+ include :
32
26
- os : macos-latest
33
- ocaml-compiler : 5.0.x
34
- - os : macos-latest
35
- ocaml-compiler : 5.1.x
27
+ ocaml-compiler : " 4.14"
28
+ - os : windows-latest
29
+ ocaml-compiler : " 4.14"
30
+ opam-repositories : |
31
+ opam-repository-mingw: https://github.com/ocaml-opam/opam-repository-mingw.git#sunset
32
+ default: https://github.com/ocaml/opam-repository.git
36
33
37
34
runs-on : ${{ matrix.os }}
38
35
@@ -42,81 +39,70 @@ jobs:
42
39
git config --global core.autocrlf false
43
40
git config --global core.eol lf
44
41
45
- - name : Checkout code
46
- uses : actions/checkout@v3
42
+ - name : Checkout tree
43
+ uses : actions/checkout@v4
47
44
with :
48
45
submodules : true
49
46
50
- - name : Use latest LTS Node.js release
51
- uses : actions/setup-node@v3
47
+ - name : Set-up Node.js
48
+ uses : actions/setup-node@v4
52
49
with :
53
- node-version : 16.x
50
+ node-version : lts/*
54
51
55
52
- name : Install npm packages
56
53
run : yarn --frozen-lockfile
57
54
working-directory : ocaml-lsp-server/test/e2e
58
55
59
- - name : Use OCaml ${{ matrix.ocaml-compiler }}
60
- uses : ocaml/setup-ocaml@v2
61
- if : matrix.os != 'windows-latest'
62
- with :
63
- ocaml-compiler : ${{ matrix.ocaml-compiler }}
64
-
65
- - name : Use OCaml ${{ matrix.ocaml-compiler }} (Win)
56
+ - name : Set-up OCaml ${{ matrix.ocaml-compiler }}
66
57
uses : ocaml/setup-ocaml@v2
67
- if : matrix.os == 'windows-latest'
68
58
with :
69
59
ocaml-compiler : ${{ matrix.ocaml-compiler }}
70
- opam-repositories : |
71
- opam-repository-mingw: https://github.com/ocaml-opam/opam-repository-mingw.git#sunset
72
- default: https://github.com/ocaml/opam-repository.git
60
+ allow-prerelease-opam : true
61
+ opam-repositories : ${{ matrix.opam-repositories }}
73
62
74
- - name : Build and install opam packages
63
+ - name : Build and install dependencies
75
64
run : opam install .
76
65
77
66
# the makefile explains why we don't use --with-test
78
67
# ppx expect is not yet compatible with 5.1 and test output vary from one
79
68
# compiler to another. We only test on 4.14.
80
69
- name : Install test dependencies
81
- if : matrix.ocaml-compiler == '4.14.x '
70
+ if : matrix.ocaml-compiler == '4.14'
82
71
run : opam exec -- make install-test-deps
83
72
84
73
- name : Run build @all
85
- if : matrix.ocaml-compiler == '4.14.x '
74
+ if : matrix.ocaml-compiler == '4.14'
86
75
run : opam exec -- make all
87
76
88
77
- name : Run the unit tests
89
- if : matrix.ocaml-compiler == '4.14.x '
78
+ if : matrix.ocaml-compiler == '4.14'
90
79
run : opam exec -- make test-ocaml
91
80
92
81
- name : Run the template integration tests
93
- if : matrix.ocaml-compiler == '4.14.x '
82
+ if : matrix.ocaml-compiler == '4.14'
94
83
run : opam exec -- make test-e2e
95
84
96
85
coverage :
97
86
name : Coverage
98
87
runs-on : ubuntu-latest
99
- strategy :
100
- fail-fast : false
101
- matrix :
102
- ocaml-compiler :
103
- - 4.14.x
104
88
steps :
105
- - uses : actions/checkout@v3
89
+ - name : Checkout tree
90
+ uses : actions/checkout@v4
106
91
with :
107
92
submodules : true
108
- - name : Use OCaml ${{ matrix.ocaml-compiler }}
93
+
94
+ - name : Set-up OCaml
109
95
uses : ocaml/setup-ocaml@v2
110
96
with :
111
- ocaml-compiler : ${{ matrix.ocaml-compiler }}
112
- opam-depext : false
97
+ ocaml-compiler : " 4.14 "
98
+ allow-prerelease-opam : true
113
99
114
100
- name : Set git user
115
101
run : |
116
102
git config --global user.name github-actions[bot]
117
103
git config --global user.email github-actions[bot]@users.noreply.github.com
118
104
119
- - name : Install deps on Unix
105
+ - name : Install dependencies
120
106
run : |
121
107
opam install . --deps-only
122
108
opam exec -- make coverage-deps install-test-deps
0 commit comments