Skip to content

Commit

Permalink
list pids
Browse files Browse the repository at this point in the history
  • Loading branch information
mxfactorial committed May 14, 2023
1 parent 3d58dc1 commit d70c38b
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 26 deletions.
50 changes: 25 additions & 25 deletions .github/workflows/dev-integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,30 +28,30 @@ jobs:
CI: true
steps:
- uses: actions/checkout@v3
- name: install latest psql client
run: |
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update
sudo apt-get install --yes --no-install-recommends postgresql-client
- name: install golang-migrate
run: |
curl -LO https://github.com/golang-migrate/migrate/releases/download/v4.15.2/migrate.linux-amd64.deb
sudo dpkg -i migrate.linux-amd64.deb
rm migrate.linux-amd64.deb
# - name: install latest psql client
# run: |
# sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
# wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
# sudo apt-get update
# sudo apt-get install --yes --no-install-recommends postgresql-client
# - name: install golang-migrate
# run: |
# curl -LO https://github.com/golang-migrate/migrate/releases/download/v4.15.2/migrate.linux-amd64.deb
# sudo dpkg -i migrate.linux-amd64.deb
# rm migrate.linux-amd64.deb
- name: start services
run: make dev
- name: integration tests
run: make -C ./test test-local
- name: reset db
run: make reset-db
- name: client e2e tests
run: make -C ./client test-ci
- name: set current env-id for cloud
run: make resume-dev ENV_ID=${{ secrets.DEV_ENV_ID }}
- name: install cargo cross
run: cargo install cross --git https://github.com/cross-rs/cross
- name: deploy to cloud
run: bash scripts/deploy-all.sh --env dev --transaction-services-only
- name: cloud integration tests
run: make -C ./test test-cloud ENV=dev
# - name: test service integration
# run: make -C ./test test-local
# - name: reset db
# run: make reset-db
# - name: e2e test client
# run: make -C ./client test-ci
# - name: set current env-id for cloud
# run: make resume-dev ENV_ID=${{ secrets.DEV_ENV_ID }}
# - name: install cargo cross
# run: cargo install cross --git https://github.com/cross-rs/cross
# - name: deploy to cloud
# run: bash scripts/deploy-all.sh --env dev --transaction-services-only
# - name: cloud integration tests
# run: make -C ./test test-cloud ENV=dev
4 changes: 3 additions & 1 deletion scripts/restart-local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,13 @@ function restart() {
echo -e -n "\n${RED}*** not all apps were started. $RESTARTS restart(s) left before exiting${RESET}\n"
source ./scripts/stop-local.sh
source ./scripts/start-local.sh
echo "pids"
make --no-print-directory list-pids
sleep "$RESTART_SLEEP_SECONDS"
RESTART_COUNT=$(($RESTART_COUNT+1))
done
if [[ "$(make --no-print-directory list-pids | wc -l | xargs)" -lt "$REQ_PID_COUNT" ]]; then
echo -e -n "\n${RED}*** only "$(make --no-print-directory list-pids | wc -l | xargs)" apps were started when were $REQ_PID_COUNT required. list of started apps:${RESET}\n\n"
echo -e -n "\n${RED}*** only "$(make --no-print-directory list-pids | wc -l | xargs)" apps started when $REQ_PID_COUNT were required. list of started apps:${RESET}\n\n"
make --no-print-directory list-pids
echo -e -n "\n${RED}*** \"make stop-dev && make dev\" in a separate shell to try again${RESET}\n"
fi
Expand Down
1 change: 1 addition & 0 deletions test/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,4 @@ get-secrets:
bash scripts/create-env-file.sh \
--app-name $(APP_NAME) \
--env $(ENV)

0 comments on commit d70c38b

Please sign in to comment.