2020 OCAMLRUNPARAM : b
2121
2222jobs :
23- test-rewatch :
24- # needs:
25- # - publish
23+ test-rewatch-integration :
24+ needs :
25+ - pkg-pr-new
2626 runs-on : ubuntu-latest
2727 env :
2828 RUST_BACKTRACE : " 1"
@@ -35,32 +35,17 @@ jobs:
3535 uses : actions/setup-node@v4
3636 with :
3737 node-version-file : .nvmrc
38-
39- - name : Restore build cache
40- id : build-cache
41- uses : actions/cache@v4
42- with :
43- path : rewatch/target
44- key : rewatch-build-v2-${{ runner.os }}-${{ hashFiles('rewatch/src/**', 'rewatch/Cargo.lock') }}
45-
46- - name : Install rust toolchain
47- if : steps.build-cache.outputs.cache-hit != 'true'
48- uses : dtolnay/rust-toolchain@master
49- with :
50- toolchain : stable
51-
52- - name : Build rewatch
53- if : steps.build-cache.outputs.cache-hit != 'true'
54- run : |
55- cargo build --manifest-path rewatch/Cargo.toml --release
56-
57- - name : Run rewatch unit tests
38+ - name : Install ReScript package
5839 run : |
59- cargo test --manifest-path rewatch/Cargo.toml
40+ COMMIT_SHA="${{ github.event.pull_request.head.sha || github.sha }}"
41+ npm i --no-audit \
42+ "https://pkg.pr.new/rescript-lang/rescript@${COMMIT_SHA::7}"
43+ shell : bash
44+ working-directory : rewatch/testrepo
6045
6146 - name : Run rewatch integration tests
6247 run : |
63- make test-rewatch
48+ make test-rewatch-ci
6449
6550 build-rewatch :
6651 strategy :
@@ -120,6 +105,10 @@ jobs:
120105 run : |
121106 cargo build --manifest-path rewatch/Cargo.toml --target ${{ matrix.rust-target }} --release
122107
108+ - name : Run rewatch unit tests
109+ run : |
110+ cargo test --manifest-path rewatch/Cargo.toml
111+
123112 - name : Copy rewatch binary
124113 run : |
125114 cp rewatch/target/${{ matrix.rust-target }}/release/rewatch${{ runner.os == 'Windows' && '.exe' || '' }} rewatch.exe
0 commit comments