11name : graphql-ppx-pipeline
22
3- on : [pull_request, push]
3+ on :
4+ pull_request :
5+ types : [opened, synchronize]
46
57jobs :
6- test_and_build_linux :
8+ test_and_build :
79 name : ${{ matrix.os }}/node-${{ matrix.node-version }}
810 runs-on : ${{ matrix.os }}
911 strategy :
1012 matrix :
11- node-version : [16.x]
13+ node-version :
14+ - 18.x
15+ ocaml-compiler :
16+ - 5.1.0
1217 os : [ubuntu-latest]
13-
1418 container :
15- image : alexfedoseev/alpine-node-yarn-esy:0.0.4
19+ image : ocaml/opam:alpine_ocaml-5.15.0
1620
1721 steps :
1822 - uses : actions/checkout@v1
@@ -21,117 +25,44 @@ jobs:
2125 with :
2226 node-version : ${{ matrix.node-version }}
2327
24- - name : Add tar
25- run : apk add --no-cache tar
26- - name : Install
27- run : esy install
28-
29- - name : Print esy cache
30- id : print_esy_cache
31- run : node .github/workflows/print_esy_cache.js
32-
33- - name : Try to restore dependencies cache
34- uses : actions/cache@v2
35- id : deps-cache
36- with :
37- path : ${{ steps.print_esy_cache.outputs.esy_cache }}
38- key : ${{ matrix.os }}-${{ hashFiles('**/index.json') }}
39- restore-keys : |
40- ${{ matrix.os }}-
41-
42- - name : build
43- run : esy b
44-
45- - name : native tests
46- run : |
47- esy b dune runtest -f
48- env :
49- CI : true
50-
51- - name : snapshot tests
52- env :
53- GRAPHQL_CI : true
28+ - name : Install Deps
5429 run : |
30+ make install
5531 npm ci --no-optional --ignore-scripts
56- esy test
57- esy release-static
5832
59- - name : (only on release) Upload artifacts ${{ matrix.os }}
60- uses : actions/upload-artifact@master
61- with :
62- name : ${{ matrix.os }}
63- path : _build/default/src/bin/bin.exe
33+ - name : Build
34+ run : make build
6435
65- test_and_build :
66- name : ${{ matrix.os }}/node-${{ matrix.node-version }}
67- runs-on : ${{ matrix.os }}
68- strategy :
69- matrix :
70- node-version : [16.x]
71- os : [windows-latest, macOS-latest]
72-
73- steps :
74- - uses : actions/checkout@v1
75-
76- - name : Use Node.js ${{ matrix.node-version }}
77- uses : actions/setup-node@v1
78- with :
79- node-version : ${{ matrix.node-version }}
80-
81- - name : Install esy
82- run : |
83- npm install -g esy@0.6.12
84-
85- - name : Install
86- run : esy install
87-
88- - name : Print esy cache
89- id : print_esy_cache
90- run : node .github/workflows/print_esy_cache.js
91-
92- - name : Try to restore dependencies cache
93- id : deps-cache
94- uses : actions/cache@v2
95- with :
96- path : ${{ steps.print_esy_cache.outputs.esy_cache }}
97- key : ${{ matrix.os }}-${{ hashFiles('**/index.json') }}
98-
99- - name : build
100- run : esy b
36+ - name : Native Tests
37+ run : make native-tests
38+ env :
39+ CI : true
10140
102- - name : test-native
103- run : |
104- esy b dune runtest -f
41+ - name : Snapshot Tests
42+ run : make snapshot-tests
10543 env :
10644 CI : true
10745
108- - name : npm ci
109- if : runner.os != 'Windows'
110- run : |
111- npm ci --no-optional
46+ - name : Release Static
11247 env :
11348 GRAPHQL_CI : true
49+ run : make release-static
11450
115- - name : snaphot tests
116- if : runner.os != 'Windows'
117- run : |
118- esy test
119-
120- - name : (only on release) Upload artifacts ${{ matrix.os }}
51+ - name : Upload artifacts ${{ matrix.os }} (Only on release)
12152 uses : actions/upload-artifact@master
12253 with :
12354 name : ${{ matrix.os }}
12455 path : _build/default/src/bin/bin.exe
12556
12657 publish :
127- needs : [test_and_build, test_and_build_linux ]
58+ needs : [test_and_build]
12859 name : (only on release) Publish
12960 runs-on : ubuntu-latest
13061 steps :
13162 - uses : actions/checkout@v1
13263 - uses : actions/setup-node@v1
13364 with :
134- node-version : " 12 .x"
65+ node-version : " 18 .x"
13566 registry-url : " https://registry.npmjs.org"
13667
13768 - name : Download linux artifacts
0 commit comments