Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
ryangoree committed Aug 3, 2023
1 parent 70f83b5 commit 3873577
Showing 1 changed file with 73 additions and 71 deletions.
144 changes: 73 additions & 71 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
steps:
- uses: actions/checkout@v3
with:
fetch-depth: ${{ github.event.pull_request.commits }}
submodules: recursive
token: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -40,78 +41,79 @@ jobs:
SERVICES_CHANGED=$(git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} | grep -m 1 "^services/")
if [ -n "$SERVICES_CHANGED" ]; then
docker build services/artifacts -t ghcr.io/${{ github.repository }}/artifacts:${{ github.sha }}
docker build services/fund-accounts -t ghcr.io/${{ github.repository }}/fund-accounts:${{ github.sha }}
export INFRA_TAG=${{ github.sha }}
echo $((${{ github.event.pull_request.commits }} + 1))
# docker build services/artifacts -t ghcr.io/${{ github.repository }}/artifacts:${{ github.sha }}
# docker build services/fund-accounts -t ghcr.io/${{ github.repository }}/fund-accounts:${{ github.sha }}
# export INFRA_TAG=${{ github.sha }}
fi
docker compose up -d
# docker compose up -d
# The mine service should exit with a non-zero error code.
- name: Check mine service
run: |
DIRNAME=$(basename $(pwd))
MINE_ERROR=$(docker wait $DIRNAME-mine-1)
if [ $MINE_ERROR -ne 0 ]; then
echo "Mine service exited with an error"
exit 1
fi
# The fund-accounts should exit with a non-zero error code.
- name: Check fund Accounts service
run: |
DIRNAME=$(basename $(pwd))
FUND_ACCOUNTS_ERROR=$(docker wait $DIRNAME-fund-accounts-1)
if [ $FUND_ACCOUNTS_ERROR -ne 0 ]; then
echo "Fund accounts service exited with an error"
exit 1
fi
# The ethereum service should be running.
- name: Check ethereum service
run: |
if [ -z "$(docker compose ps -q ethereum)" ]; then
echo "Ethereum service exited unexpectedly"
exit 1
fi
# The artifacts service should be running.
- name: Check artifacts service
run: |
if [ -z "$(docker compose ps -q artifacts)" ]; then
echo "Artifacts service exited unexpectedly"
exit 1
fi
# The checkpoint-bot service should be running.
- name: Check checkpoint-bot service
run: |
if [ -z "$(docker compose ps -q checkpoint-bot)" ]; then
echo "Checkpoint bot service exited unexpectedly"
exit 1
fi
# The data service should be running.
- name: Check data service
run: |
if [ -z "$(docker compose ps -q data)" ]; then
echo "Data service exited unexpectedly"
exit 1
fi
# The db service should be running.
- name: Check db service
run: |
if [ -z "$(docker compose ps -q db)" ]; then
exit 1
fi
# The hyperdrive-monorepo service should be running.
- name: Check hyperdrive-monorepo service
run: |
if [ -z "$(docker compose ps -q hyperdrive-monorepo)" ]; then
echo "Hyperdrive monorepo service exited unexpectedly"
exit 1
fi
# - name: Check mine service
# run: |
# DIRNAME=$(basename $(pwd))
# MINE_ERROR=$(docker wait $DIRNAME-mine-1)

# if [ $MINE_ERROR -ne 0 ]; then
# echo "Mine service exited with an error"
# exit 1
# fi

# # The fund-accounts should exit with a non-zero error code.
# - name: Check fund Accounts service
# run: |
# DIRNAME=$(basename $(pwd))
# FUND_ACCOUNTS_ERROR=$(docker wait $DIRNAME-fund-accounts-1)

# if [ $FUND_ACCOUNTS_ERROR -ne 0 ]; then
# echo "Fund accounts service exited with an error"
# exit 1
# fi

# # The ethereum service should be running.
# - name: Check ethereum service
# run: |
# if [ -z "$(docker compose ps -q ethereum)" ]; then
# echo "Ethereum service exited unexpectedly"
# exit 1
# fi

# # The artifacts service should be running.
# - name: Check artifacts service
# run: |
# if [ -z "$(docker compose ps -q artifacts)" ]; then
# echo "Artifacts service exited unexpectedly"
# exit 1
# fi

# # The checkpoint-bot service should be running.
# - name: Check checkpoint-bot service
# run: |
# if [ -z "$(docker compose ps -q checkpoint-bot)" ]; then
# echo "Checkpoint bot service exited unexpectedly"
# exit 1
# fi

# # The data service should be running.
# - name: Check data service
# run: |
# if [ -z "$(docker compose ps -q data)" ]; then
# echo "Data service exited unexpectedly"
# exit 1
# fi

# # The db service should be running.
# - name: Check db service
# run: |
# if [ -z "$(docker compose ps -q db)" ]; then
# exit 1
# fi

# # The hyperdrive-monorepo service should be running.
# - name: Check hyperdrive-monorepo service
# run: |
# if [ -z "$(docker compose ps -q hyperdrive-monorepo)" ]; then
# echo "Hyperdrive monorepo service exited unexpectedly"
# exit 1
# fi

0 comments on commit 3873577

Please sign in to comment.