Update Submodule from warp-drive push to master #1627
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
name: Build & Test | |
on: | |
push: | |
branches: master | |
pull_request: | |
branches: "*" | |
jobs: | |
build: | |
runs-on: ubuntu-latest-m | |
env: | |
REGISTRY: ghcr.io/fhenixprotocol/nitro | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
token: ${{ secrets.GH_PAT_LIOR }} | |
- uses: actions/setup-go@v4 | |
with: | |
go-version: 1.21.3 | |
- name: Docker Login | |
uses: docker/[email protected] | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GH_PAT_LIOR }} | |
- name: Build Coprocessor Image | |
uses: docker/build-push-action@v4 | |
with: | |
file: Dockerfile | |
context: . | |
- name: Start Engine | |
run: | | |
make start-engine | |
sleep 180 # wait for the engine to start - usually takes 3 minutes | |
while ! nc -z localhost 50051; do | |
echo "Waiting for the engine to be available on port 50051..." | |
sleep 1 | |
done | |
echo "Engine is now available on port 50051." | |
- name: Run Tests | |
run: | | |
make unit-test | |
- name: Stop Engine | |
run: | | |
make stop-engine |