forked from Galactica-corp/galactica
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Launch some test with three node in localnet
- Loading branch information
1 parent
407ddfd
commit c2ff3b3
Showing
9 changed files
with
630 additions
and
248 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,74 @@ | ||
name: CI/CD Pipeline | ||
|
||
on: | ||
push: | ||
branches: | ||
- "*" | ||
pull_request: | ||
types: [opened, synchronize] | ||
workflow_dispatch: | ||
inputs: | ||
branch: | ||
description: "Branch to run tests on" | ||
required: true | ||
default: "main" | ||
release: | ||
types: [created] | ||
|
||
jobs: | ||
build: | ||
runs-on: self-hosted | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: "1.22" | ||
|
||
- name: Build binary | ||
run: make build | ||
|
||
- name: Upload binary artifact | ||
if: github.event_name == 'release' | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: galacticad | ||
path: build/galacticad | ||
|
||
test: | ||
runs-on: self-hosted | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- uses: astral-sh/setup-uv@v3 | ||
with: | ||
version: "latest" | ||
|
||
- name: Run tests | ||
run: make test | ||
|
||
- name: Test status check | ||
if: failure() | ||
run: exit 1 | ||
|
||
permissions: | ||
pull-requests: write | ||
|
||
manual-tests: | ||
runs-on: self-hosted | ||
needs: test | ||
if: github.event_name == 'workflow_dispatch' | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: "1.17" | ||
|
||
- name: Run manual tests | ||
run: go test ./... |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
test: ## some tests | ||
cd tests/galacli && $(MAKE) |
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 |
---|---|---|
|
@@ -2,3 +2,4 @@ | |
data | ||
config | ||
node0* | ||
__pycache__ |
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 @@ | ||
uname=$(shell uname -s) | ||
is_darwin :=$(filter Darwin,$(uname)) | ||
|
||
all: $(if $(is_darwin),network,) clean start | ||
|
||
clean: | ||
rm -rf node0* | ||
|
||
.venv/bin/python: | ||
uv venv | ||
uv sync | ||
|
||
start: .venv/bin/python | ||
.venv/bin/python galacli.py | ||
|
||
ifeq ($(uname),Darwin) | ||
network: /tmp/127.0.0.2 /tmp/127.0.0.3 /tmp/127.0.0.4 | ||
/tmp/127.0.0.%: | ||
sudo ifconfig lo0 alias $(shell basename $@) up && touch $@ | ||
endif |
Oops, something went wrong.