-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add testing workflow
- Loading branch information
Showing
7 changed files
with
358 additions
and
271 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: 🚀 Test and Build | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: 📥 Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: ⚙️ Install dependencies | ||
run: npm install | ||
|
||
- name: ✅ Run unit tests | ||
run: npm test test/unit | ||
|
||
- name: ✅ Run e2e tests | ||
run: ./scripts/test-e2e.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/bash | ||
echo "Starting Sidecar" | ||
docker run \ | ||
--name durabletask-sidecar -d --rm \ | ||
-p 4001:4001 \ | ||
--env 'DURABLETASK_SIDECAR_LOGLEVEL=Debug' \ | ||
cgillum/durabletask-sidecar:latest start \ | ||
--backend Emulator | ||
|
||
echo "Running E2E tests" | ||
npm run test test/e2e | ||
|
||
# It should fail if the npm run fails | ||
if [ $? -ne 0 ]; then | ||
echo "E2E tests failed" | ||
exit 1 | ||
fi | ||
|
||
echo "Stopping Sidecar" | ||
docker stop durabletask-sidecar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.