Skip to content

Commit

Permalink
refactor: add steps for downloading latest keploy and pilot in the wo…
Browse files Browse the repository at this point in the history
…rkflow

Signed-off-by: gouravkrosx <gouravgreatkr@gmail.com>
  • Loading branch information
gouravkrosx committed Apr 29, 2024
1 parent 198ba08 commit 3a6c14c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@ check_test_status() {
git fetch origin
git checkout native-linux

# Get the hosted version of keploy
curl --silent --location "https://github.com/keploy/keploy/releases/latest/download/keploy_linux_amd64.tar.gz" | tar xz -C /tmp
sudo mkdir -p /usr/local/bin && sudo mv /tmp/keploy /usr/local/bin/kRecordHosted

# Check and remove keploy config file if exists
delete_if_exists "./keploy.yml"

Expand Down Expand Up @@ -88,10 +84,6 @@ fi

#### Testing Phase of test-bench ####

## Get the pilot for tests and mocks assertion
curl --silent -o pilot --location "https://github.com/keploy/pilot/releases/latest/download/pilot_linux_amd64" &&
sudo chmod a+x pilot && sudo mkdir -p /usr/local/bin && sudo mv pilot /usr/local/bin

## Test assertion
pilot -test-assert -preRecPath . -testBenchPath ./test-bench
exit_status=$?
Expand Down
13 changes: 12 additions & 1 deletion .github/workflows/test_stage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2

- name: Download Keploy Binary
- name: Download Keploy Build Binary
uses: actions/download-artifact@v2
with:
name: keploy-binary
Expand All @@ -25,6 +25,17 @@ jobs:
run: |
sudo chmod +x /usr/local/bin/kTestBuild
- name: Download the latest released binary of keploy
run: |
curl --silent --location "https://github.com/keploy/keploy/releases/latest/download/keploy_linux_amd64.tar.gz" | tar xz -C /tmp
sudo mkdir -p /usr/local/bin && sudo mv /tmp/keploy /usr/local/bin/kRecordHosted

## Get the pilot for tests and mocks assertion
- name: Download the latest version of pilot
run: |
curl --silent -o pilot --location "https://github.com/keploy/pilot/releases/latest/download/pilot_linux_amd64" &&
sudo chmod a+x pilot && sudo mkdir -p /usr/local/bin && sudo mv pilot /usr/local/bin

- name: Checkout the samples-go repository
uses: actions/checkout@v2
with:
Expand Down

0 comments on commit 3a6c14c

Please sign in to comment.