Skip to content

Commit

Permalink
Merge pull request #663 from iotaledger/feat/add-docker-test-framewor…
Browse files Browse the repository at this point in the history
…k-workflow

Add CI workflow for nightly docker network tests
  • Loading branch information
muXxer authored Jan 16, 2024
2 parents c6f349d + fd96547 commit 57a14a4
Show file tree
Hide file tree
Showing 12 changed files with 91 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build_tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@ on:
pull_request:
paths:
- 'tools/genesis-snapshot/**'
jobs:

jobs:
build:
name: Import Check
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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql_analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: develop

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docker-network-health.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Run Docker Network and Check Health
name: Docker Network Health Check

on:
workflow_dispatch:
Expand All @@ -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: |
Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/docker-network-tests-nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
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:
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 ${{ github.event.inputs.testCases }}
10 changes: 5 additions & 5 deletions .github/workflows/feature-network-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -36,21 +36,21 @@ 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
build-args: |
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
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/gendoc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,23 @@ on:
- 'documentation/**'
- 'scripts/**'
- 'tools/**'

jobs:
golangci-lint:
name: GolangCI-Lint
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'

Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -24,15 +24,14 @@ jobs:
- name: Run Tests
run: go test ./... -tags rocksdb -count=1 -timeout 20m


unit-tests-race:
name: Unit tests -race
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
Expand Down
34 changes: 34 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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).
File renamed without changes.
2 changes: 1 addition & 1 deletion tools/gendoc/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func main() {
createMarkdownFile(
application,
"configuration_header.md",
"../../documentation/docs/references/configuration.md",
"../../documentation/configuration.md",
ignoreFlags,
replaceTopicNames,
)
Expand Down

0 comments on commit 57a14a4

Please sign in to comment.