Skip to content

Commit

Permalink
client test data
Browse files Browse the repository at this point in the history
  • Loading branch information
irmastnt committed Apr 30, 2024
1 parent cc7c29d commit 5964e95
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ jobs:
sudo npm install --global @bazel/bazelisk
- name: Install dependencies
run: make npm-install
- name: Get api client test data from knora-api (makefile variant)
run: make get-test-data-from-release
# - name: Copy api client test data from folder
# run: make copy-test-data-from-folder
- name: Prepare test data
run: make prepare-test-data
- name: Run unit tests
Expand Down
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
THIS_FILE := $(lastword $(MAKEFILE_LIST))
CURRENT_DIR := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))

TEST_DATA_SRC_DIR := $(CURRENT_DIR)/test/
TEST_DATA_FILE := client-test-data.zip

include vars.mk

# Function to get github release asset id and to download client-test-data.zip from knora-api release
Expand Down Expand Up @@ -42,6 +45,12 @@ get-test-data-from-release: ## get the test-data from assets in github release c
@rm -rf client-test-data.zip
@$(call download-test-data,$(API_REPO),$(API_VERSION))

.PHONY: copy-test-data-from-folder
copy-test-data-from-folder:
rm -f $(CURRENT_DIR)/$(TEST_DATA_FILE)
@echo "Copying $(TEST_DATA_FILE) from $(TEST_DATA_SRC_DIR) to $(CURRENT_DIR)"
cp $(TEST_DATA_SRC_DIR)$(TEST_DATA_FILE) $(CURRENT_DIR)/$(TEST_DATA_FILE)

.PHONY: generate-test-data
generate-test-data: ## generate test data from Knora-API
@rm -rf $(CURRENT_DIR)/.tmp/typescript
Expand Down
Binary file added client-test-data.zip
Binary file not shown.

0 comments on commit 5964e95

Please sign in to comment.