From 0cd59cb8d03e9b39fb9304503d26351748e27984 Mon Sep 17 00:00:00 2001 From: Oleksii Shmalko Date: Tue, 30 Jul 2024 00:07:07 +0300 Subject: [PATCH] chore: add sdk-test-data as a submodule --- .github/workflows/ci.yml | 8 +++++--- .github/workflows/msrv.yml | 4 +++- .github/workflows/publish.yml | 9 ++++++--- .gitignore | 1 - .gitmodules | 3 +++ Makefile | 13 ------------- sdk-test-data | 1 + 7 files changed, 18 insertions(+), 21 deletions(-) create mode 100644 .gitmodules create mode 160000 sdk-test-data diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5a78e364..405eacdf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,9 +18,10 @@ jobs: toolchain: - stable steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 + with: + submodules: true - run: npm ci - - run: make test-data - run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }} - run: cargo build --verbose - run: cargo test --verbose @@ -37,6 +38,8 @@ jobs: steps: - uses: actions/checkout@v4 + with: + submodules: true - name: Set up Ruby & Rust uses: oxidize-rb/actions/setup-ruby-and-rust@v1 @@ -47,7 +50,6 @@ jobs: rubygems: '3.5.11' - run: npm ci - - run: make test-data - name: Check Cargo.lock # Ensure that Cargo.lock matches Cargo.toml diff --git a/.github/workflows/msrv.yml b/.github/workflows/msrv.yml index e5654777..a3433b21 100644 --- a/.github/workflows/msrv.yml +++ b/.github/workflows/msrv.yml @@ -19,7 +19,9 @@ jobs: - stable steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 + with: + submodules: true - uses: actions/cache@v2 with: path: | diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 66b0837a..a0b3147f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -29,12 +29,13 @@ jobs: runs-on: ubuntu-latest if: ${{ startsWith(github.ref_name, 'eppo_core@') || startsWith(github.ref_name, 'rust-sdk@') }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 + with: + submodules: true - uses: actions/setup-node@v3 with: node-version: '20' - run: npm ci - - run: make test-data - name: Install Rust toolchain run: rustup update stable && rustup default stable - name: Build Release @@ -59,7 +60,9 @@ jobs: runs-on: ubuntu-latest if: ${{ startsWith(github.ref_name, 'ruby-sdk@') }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 + with: + submodules: true - uses: actions/setup-node@v3 with: node-version: '20' diff --git a/.gitignore b/.gitignore index 3ce25d6b..45cdbaf8 100644 --- a/.gitignore +++ b/.gitignore @@ -13,5 +13,4 @@ # MSVC Windows builds of rustc generate these, which store debugging information *.pdb -/sdk-test-data/ node_modules diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000..e1fee82b --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "sdk-test-data"] + path = sdk-test-data + url = https://github.com/Eppo-exp/sdk-test-data.git diff --git a/Makefile b/Makefile index 1eb282f3..3f2cf23a 100644 --- a/Makefile +++ b/Makefile @@ -23,19 +23,6 @@ help: Makefile @echo "usage: make " @sed -n 's/^##//p' $< -## test-data -testDataDir := sdk-test-data -branchName := main -githubRepoLink := https://github.com/Eppo-exp/sdk-test-data.git -.PHONY: test-data -test-data: - rm -rf ${testDataDir} - git clone -b ${branchName} --depth 1 --single-branch ${githubRepoLink} ${testDataDir} - -${testDataDir}: - rm -rf ${testDataDir} - git clone -b ${branchName} --depth 1 --single-branch ${githubRepoLink} ${testDataDir} - .PHONY: test test: ${testDataDir} npm test diff --git a/sdk-test-data b/sdk-test-data new file mode 160000 index 00000000..830f20f8 --- /dev/null +++ b/sdk-test-data @@ -0,0 +1 @@ +Subproject commit 830f20f8d6623338ca3dfbd3edc6fc151032d427