From 4214eba421613550602eea5287f91c8fcd54b4b2 Mon Sep 17 00:00:00 2001 From: muXxer Date: Tue, 16 Jan 2024 09:25:51 +0100 Subject: [PATCH 1/5] Update workflow actions --- .github/workflows/build_docker.yml | 2 +- .github/workflows/build_tools.yml | 4 ++-- .github/workflows/codeql_analysis.yml | 2 +- .github/workflows/docker-network-health.yml | 2 +- .github/workflows/feature-network-deploy.yml | 10 +++++----- .github/workflows/gendoc.yml | 6 +++--- .github/workflows/golangci-lint.yml | 6 +++--- .github/workflows/unit-test.yml | 8 ++++---- 8 files changed, 20 insertions(+), 20 deletions(-) diff --git a/.github/workflows/build_docker.yml b/.github/workflows/build_docker.yml index d7175f142..b8d1ff3df 100644 --- a/.github/workflows/build_docker.yml +++ b/.github/workflows/build_docker.yml @@ -11,7 +11,7 @@ jobs: runs-on: self-hosted steps: - name: Check out code into the Go module directory - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Build Docker image run: DOCKER_BUILDKIT=1 docker build . --file Dockerfile --tag iota-core:latest diff --git a/.github/workflows/build_tools.yml b/.github/workflows/build_tools.yml index 18481f055..705817480 100644 --- a/.github/workflows/build_tools.yml +++ b/.github/workflows/build_tools.yml @@ -12,9 +12,9 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - - uses: actions/setup-go@v4 + - uses: actions/setup-go@v5 with: go-version-file: 'go.mod' cache: false diff --git a/.github/workflows/codeql_analysis.yml b/.github/workflows/codeql_analysis.yml index e1846983b..75648cdb8 100644 --- a/.github/workflows/codeql_analysis.yml +++ b/.github/workflows/codeql_analysis.yml @@ -22,7 +22,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: develop diff --git a/.github/workflows/docker-network-health.yml b/.github/workflows/docker-network-health.yml index e85695b91..4aea7d3d6 100644 --- a/.github/workflows/docker-network-health.yml +++ b/.github/workflows/docker-network-health.yml @@ -20,7 +20,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Run network, wait and check health run: | diff --git a/.github/workflows/feature-network-deploy.yml b/.github/workflows/feature-network-deploy.yml index 7192e697e..bd1589d34 100644 --- a/.github/workflows/feature-network-deploy.yml +++ b/.github/workflows/feature-network-deploy.yml @@ -22,10 +22,10 @@ jobs: DOCKER_BUILDKIT: 1 steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Cache Docker layers uses: actions/cache@v3 @@ -36,13 +36,13 @@ jobs: ${{ runner.os }}-buildx- - name: Login to DockerHub - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: username: '${{ secrets.IOTALEDGER_DOCKER_USERNAME }}' password: '${{ secrets.IOTALEDGER_DOCKER_PASSWORD }}' - name: Publish to Docker Hub - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v5 with: tags: iotaledger/iota-core:feature push: true @@ -50,7 +50,7 @@ jobs: cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,mode=max,dest=/tmp/.buildx-cache-new - - uses: actions/setup-go@v4 + - uses: actions/setup-go@v5 with: go-version-file: 'tools/genesis-snapshot/go.mod' cache: false diff --git a/.github/workflows/gendoc.yml b/.github/workflows/gendoc.yml index f6155b129..f5e5c39dc 100644 --- a/.github/workflows/gendoc.yml +++ b/.github/workflows/gendoc.yml @@ -10,10 +10,10 @@ jobs: runs-on: self-hosted steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Go - uses: actions/setup-go@v4 + uses: actions/setup-go@v5 with: go-version-file: 'tools/gendoc/go.mod' cache: false @@ -26,7 +26,7 @@ jobs: run: go mod tidy && go run main.go - name: Create Pull Request - uses: peter-evans/create-pull-request@v4 + uses: peter-evans/create-pull-request@v5 with: token: ${{ secrets.GITHUB_TOKEN }} title: "chore(gendoc): update docs" diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 5ca39435b..89abd9656 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -12,16 +12,16 @@ jobs: runs-on: self-hosted steps: - name: Check out code into the Go module directory - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Checkout custom linter - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: karimodm/typegroupingcheck path: typegroupingcheck - name: Setup go - uses: actions/setup-go@v4 + uses: actions/setup-go@v5 with: go-version-file: './typegroupingcheck/go.mod' diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index 4da85542c..75a399284 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -11,9 +11,9 @@ jobs: runs-on: self-hosted steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - - uses: actions/setup-go@v4 + - uses: actions/setup-go@v5 with: go-version-file: 'go.mod' cache: false @@ -30,9 +30,9 @@ jobs: runs-on: self-hosted steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - - uses: actions/setup-go@v4 + - uses: actions/setup-go@v5 with: go-version-file: 'go.mod' cache: false From ab575d097ec3ff4858004cde534ab81cc5b5b26d Mon Sep 17 00:00:00 2001 From: muXxer Date: Tue, 16 Jan 2024 09:57:51 +0100 Subject: [PATCH 2/5] Add CI workflow for nightly docker network tests --- .../docker-network-tests-nightly.yml | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/docker-network-tests-nightly.yml diff --git a/.github/workflows/docker-network-tests-nightly.yml b/.github/workflows/docker-network-tests-nightly.yml new file mode 100644 index 000000000..52cd2d8d5 --- /dev/null +++ b/.github/workflows/docker-network-tests-nightly.yml @@ -0,0 +1,27 @@ +name: Docker Network Tests + +on: + schedule: + - cron: '0 1 * * *' # Runs every day at 1 AM + +jobs: + test: + runs-on: self-hosted + + steps: + - name: Check out code + uses: actions/checkout@v4 + + - name: Set up Docker + uses: docker/setup-buildx-action@v3 + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version-file: 'go.mod' + cache: false + + - name: Run all tests + run: | + cd tools/docker-network/tests && + ./run_tests.sh From ba8f14a83b9d7762b33c43135b46561fe6420c1f Mon Sep 17 00:00:00 2001 From: muXxer Date: Tue, 16 Jan 2024 11:29:57 +0100 Subject: [PATCH 3/5] Extend the workflow to trigger it manually --- .github/workflows/docker-network-tests-nightly.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker-network-tests-nightly.yml b/.github/workflows/docker-network-tests-nightly.yml index 52cd2d8d5..2a2176d49 100644 --- a/.github/workflows/docker-network-tests-nightly.yml +++ b/.github/workflows/docker-network-tests-nightly.yml @@ -3,6 +3,12 @@ name: Docker Network Tests on: schedule: - cron: '0 1 * * *' # Runs every day at 1 AM + workflow_dispatch: + inputs: + testCases: + description: 'Custom test cases to run:' + required: false + default: "" jobs: test: @@ -24,4 +30,4 @@ jobs: - name: Run all tests run: | cd tools/docker-network/tests && - ./run_tests.sh + ./run_tests.sh ${{ github.event.inputs.testCases }} From db87cf40fd10209c1591a70c12f932120a0996c2 Mon Sep 17 00:00:00 2001 From: muXxer Date: Tue, 16 Jan 2024 11:33:07 +0100 Subject: [PATCH 4/5] Change the path of configuration.md --- documentation/{docs/references => }/configuration.md | 0 tools/gendoc/main.go | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename documentation/{docs/references => }/configuration.md (100%) diff --git a/documentation/docs/references/configuration.md b/documentation/configuration.md similarity index 100% rename from documentation/docs/references/configuration.md rename to documentation/configuration.md diff --git a/tools/gendoc/main.go b/tools/gendoc/main.go index 17c843a18..56abbee71 100644 --- a/tools/gendoc/main.go +++ b/tools/gendoc/main.go @@ -69,7 +69,7 @@ func main() { createMarkdownFile( application, "configuration_header.md", - "../../documentation/docs/references/configuration.md", + "../../documentation/configuration.md", ignoreFlags, replaceTopicNames, ) From fd96547360ed587b10a4607d56177ba0d71cdc34 Mon Sep 17 00:00:00 2001 From: muXxer Date: Tue, 16 Jan 2024 11:46:07 +0100 Subject: [PATCH 5/5] Add an initial README with some useful badges --- .github/workflows/build_tools.yml | 2 +- .github/workflows/docker-network-health.yml | 2 +- .github/workflows/golangci-lint.yml | 1 + .github/workflows/unit-test.yml | 1 - README.md | 34 +++++++++++++++++++++ 5 files changed, 37 insertions(+), 3 deletions(-) create mode 100644 README.md diff --git a/.github/workflows/build_tools.yml b/.github/workflows/build_tools.yml index 705817480..2484aff0c 100644 --- a/.github/workflows/build_tools.yml +++ b/.github/workflows/build_tools.yml @@ -4,8 +4,8 @@ on: pull_request: paths: - 'tools/genesis-snapshot/**' -jobs: +jobs: build: name: Import Check runs-on: self-hosted diff --git a/.github/workflows/docker-network-health.yml b/.github/workflows/docker-network-health.yml index 4aea7d3d6..07851d454 100644 --- a/.github/workflows/docker-network-health.yml +++ b/.github/workflows/docker-network-health.yml @@ -1,4 +1,4 @@ -name: Run Docker Network and Check Health +name: Docker Network Health Check on: workflow_dispatch: diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 89abd9656..67a459ac1 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -6,6 +6,7 @@ on: - 'documentation/**' - 'scripts/**' - 'tools/**' + jobs: golangci-lint: name: GolangCI-Lint diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index 75a399284..d28da7e5f 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -24,7 +24,6 @@ jobs: - name: Run Tests run: go test ./... -tags rocksdb -count=1 -timeout 20m - unit-tests-race: name: Unit tests -race runs-on: self-hosted diff --git a/README.md b/README.md new file mode 100644 index 000000000..207079e7c --- /dev/null +++ b/README.md @@ -0,0 +1,34 @@ +# IOTA-Core - The IOTA 2.0 node + +IOTA-Core is the node software for the upcoming IOTA 2.0 protocol. + +--- +![GitHub Release (latest by date)](https://img.shields.io/github/v/release/iotaledger/iota-core) +![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/iotaledger/iota-core) +![GitHub License](https://img.shields.io/github/license/iotaledger/iota-core) +--- +[![build_docker](https://github.com/iotaledger/iota-core/actions/workflows/build_docker.yml/badge.svg)](https://github.com/iotaledger/iota-core/actions/workflows/build_docker.yml) +[![build_tools](https://github.com/iotaledger/iota-core/actions/workflows/build_tools.yml/badge.svg)](https://github.com/iotaledger/iota-core/actions/workflows/build_tools.yml) +[![docker-network-health](https://github.com/iotaledger/iota-core/actions/workflows/docker-network-health.yml/badge.svg)](https://github.com/iotaledger/iota-core/actions/workflows/docker-network-health.yml) +[![docker-network-tests-nightly](https://github.com/iotaledger/iota-core/actions/workflows/docker-network-tests-nightly.yml/badge.svg)](https://github.com/iotaledger/iota-core/actions/workflows/docker-network-tests-nightly.yml) +[![golangci-lint](https://github.com/iotaledger/iota-core/actions/workflows/golangci-lint.yml/badge.svg)](https://github.com/iotaledger/iota-core/actions/workflows/golangci-lint.yml) +[![release](https://github.com/iotaledger/iota-core/actions/workflows/release.yml/badge.svg)](https://github.com/iotaledger/iota-core/actions/workflows/release.yml) +[![unit-test](https://github.com/iotaledger/iota-core/actions/workflows/unit-test.yml/badge.svg)](https://github.com/iotaledger/iota-core/actions/workflows/unit-test.yml) +--- + +In this repository you will find the following branches: + +- `production`: this branch contains the latest released code targeted for the [IOTA mainnet](https://iota.org) +- `staging`: this branch contains the latest released code targeted for the [shimmer network](https://shimmer.network) +- `develop`: default branch where all development will get merged to. This represents the next iteration of the node. + +## Notes + +- **Please open a [new issue](https://github.com/iotaledger/iota-core/issues/new) if you detect an error or crash (or submit a PR if you have already fixed it).** + +## Configuration + +An overview over all configuration parameters can be found [here.](documentation/configuration.md) + +## Setup +We recommend not using this repo directly but using our pre-built [Docker images](https://hub.docker.com/r/iotaledger/iota-core).