Skip to content

Commit

Permalink
added script
Browse files Browse the repository at this point in the history
  • Loading branch information
phklive committed Feb 28, 2024
1 parent 80c60b3 commit 042ad7f
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: CI

on:
push:
branches:
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# # Publish docker image to docker hub
#
# name: Docker
#
# on:
# push:
# branches:
# - main
#
# jobs:
# run-container:
# runs-on: ubuntu-latest
#
# steps:
# - uses: actions/checkout@v4
# name: Checkout code
#
# - name: Build Docker Image
# run: docker build -t my-rust-app .
#
# - name: Run Tests
# run: docker run --name mytestcontainer my-rust-app cargo test
26 changes: 26 additions & 0 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Runs the integration tests

name: Integration

on:
push:
branches:
- main

jobs:
run-container:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
name: Checkout code

- name: Build Docker image
run: docker build -t miden-node .

- name: Run Docker image
run: docker run --name miden-node -p 57291:57291

- name: Run integration tests
run: ./scripts/run-integration-tests.sh

2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@ RUN cd miden-node && make
FROM ubuntu:22.04
RUN apt-get update && apt-get -y upgrade && apt-get install -y make libssl-dev libsqlite3-dev
COPY --from=builder /app/miden-node/scripts/start-miden-node.sh start-miden-node.sh
COPY --from=builder /app/miden-node/scripts/run-integration-tests.sh run-integration-tests.sh
COPY --from=builder /app/miden-node/node/miden-node.toml miden-node.toml
COPY --from=builder /app/miden-node/node/genesis.toml genesis.toml
COPY --from=builder /usr/local/cargo/bin/miden-node /usr/local/bin/miden-node
RUN chmod +x /start-miden-node.sh
RUN chmod +x /run-integration-tests.sh
EXPOSE 57291
CMD [ "/start-miden-node.sh" ]
2 changes: 2 additions & 0 deletions scripts/run-integration-tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
echo "hello world"

0 comments on commit 042ad7f

Please sign in to comment.