Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
end to end tests
  • Loading branch information
jfrolich committed May 5, 2025
commit 88e8b61b0aa7139b939adaeecc627d55860f7300
39 changes: 14 additions & 25 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ env:
OCAMLRUNPARAM: b

jobs:
test-rewatch:
# needs:
# - publish
test-rewatch-integration:
needs:
- pkg-pr-new
runs-on: ubuntu-latest
env:
RUST_BACKTRACE: "1"
Expand All @@ -35,32 +35,17 @@ jobs:
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc

- name: Restore build cache
id: build-cache
uses: actions/cache@v4
with:
path: rewatch/target
key: rewatch-build-v2-${{ runner.os }}-${{ hashFiles('rewatch/src/**', 'rewatch/Cargo.lock') }}

- name: Install rust toolchain
if: steps.build-cache.outputs.cache-hit != 'true'
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable

- name: Build rewatch
if: steps.build-cache.outputs.cache-hit != 'true'
run: |
cargo build --manifest-path rewatch/Cargo.toml --release

- name: Run rewatch unit tests
- name: Install ReScript package
run: |
cargo test --manifest-path rewatch/Cargo.toml
COMMIT_SHA="${{ github.event.pull_request.head.sha || github.sha }}"
npm i --no-audit \
"https://pkg.pr.new/rescript-lang/rescript@${COMMIT_SHA::7}"
shell: bash
working-directory: rewatch/testrepo

- name: Run rewatch integration tests
run: |
make test-rewatch
make test-rewatch-ci

build-rewatch:
strategy:
Expand Down Expand Up @@ -120,6 +105,10 @@ jobs:
run: |
cargo build --manifest-path rewatch/Cargo.toml --target ${{ matrix.rust-target }} --release

- name: Run rewatch unit tests
run: |
cargo test --manifest-path rewatch/Cargo.toml

- name: Copy rewatch binary
run: |
cp rewatch/target/${{ matrix.rust-target }}/release/rewatch${{ runner.os == 'Windows' && '.exe' || '' }} rewatch.exe
Expand Down
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,10 @@ test-gentype:
make -C tests/gentype_tests/typescript-react-example clean test

test-rewatch:
bash ./rewatch/tests/suite.sh
bash ./rewatch/tests/suite-ci.sh

test-rewatch-ci:
bash ./rewatch/tests/suite-ci.sh

test-all: test test-gentype test-analysis test-tools test-rewatch

Expand Down
Loading