diff --git a/.github/workflows/build_HORNET.yml b/.github/workflows/build_HORNET.yml deleted file mode 100644 index 11f01c835..000000000 --- a/.github/workflows/build_HORNET.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: Build HORNET - -on: - push: - branches: - - legacy - pull_request: - paths-ignore: - - 'documentation/**' - - 'nfpm/**' - - 'private_tangle/**' - - 'scripts/**' - - 'tools/**' - -jobs: - build: - name: Build HORNET - runs-on: ubuntu-latest - steps: - - name: Set up Go - uses: actions/setup-go@v3 - with: - go-version: "1.20" - id: go - - - name: Print Go version - run: go version - - - name: Check out code into the Go module directory - uses: actions/checkout@v3 - - - name: Build HORNET - run: go build -v . diff --git a/.github/workflows/build_docker.yml b/.github/workflows/build_docker.yml deleted file mode 100644 index 87952a250..000000000 --- a/.github/workflows/build_docker.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: Build Docker - -on: - push: - branches: - - legacy - pull_request: - paths: - - "docker/Dockerfile" - - "docker-compose.yml" - -jobs: - build: - name: Build Docker - runs-on: ubuntu-latest - steps: - - name: Check out code into the Go module directory - uses: actions/checkout@v3 - - - name: Build HORNET Docker image - run: docker build . --file docker/Dockerfile --tag hornet:latest - - - name: Test HORNET Docker image - run: docker run --rm --name hornet hornet:latest --version 2>/dev/null | grep -q "HORNET" diff --git a/.github/workflows/codeql_analysis.yml b/.github/workflows/codeql_analysis.yml deleted file mode 100644 index 9f679abff..000000000 --- a/.github/workflows/codeql_analysis.yml +++ /dev/null @@ -1,42 +0,0 @@ - -name: "CodeQL" - -on: - # Run this security check every day at 03:00 to find potential new vulnerabilities in the develop branch - schedule: - - cron: "0 3 * * *" - -jobs: - analyze: - name: Analyze - runs-on: ubuntu-latest - permissions: - actions: read - contents: read - security-events: write - - strategy: - fail-fast: false - matrix: - language: [ 'go' ] - - steps: - - name: Checkout repository - uses: actions/checkout@v3 - with: - ref: legacy - - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v2 - with: - languages: ${{ matrix.language }} - queries: security-and-quality - - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). - # If this step fails, then you should remove it and run the build manually (see below) - - name: Autobuild - uses: github/codeql-action/autobuild@v2 - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml deleted file mode 100644 index 0a31cdcc2..000000000 --- a/.github/workflows/golangci-lint.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: GolangCIlint - -on: - push: - branches: - - legacy - pull_request: - paths-ignore: - - 'documentation/**' - - 'docker/**' - - 'nfpm/**' - - 'private_tangle/**' - - 'scripts/**' - - 'tools/**' - -jobs: - golangci-lint: - name: GolangCI-Lint - runs-on: ubuntu-latest - steps: - - name: Check out code into the Go module directory - uses: actions/checkout@v3 - - - name: golangci-lint - uses: reviewdog/action-golangci-lint@v2 - with: - go_version_file: go.mod - version: v1.53.3 - github_token: ${{ secrets.GITHUB_TOKEN }} - golangci_lint_flags: "--timeout=10m" - reporter: github-pr-check - filter_mode: nofilter - fail_on_error: true diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml deleted file mode 100644 index 636fd442e..000000000 --- a/.github/workflows/integration_tests.yml +++ /dev/null @@ -1,82 +0,0 @@ -name: Integration Tests - -on: - push: - branches: - - legacy - pull_request: - paths-ignore: - - 'documentation/**' - - 'docker/**' - - 'nfpm/**' - - 'private_tangle/**' - - 'scripts/**' - - 'tools/**' - -jobs: - - common: - name: common - env: - TEST_NAME: common - runs-on: ubuntu-latest - steps: - - name: Check out code into the Go module directory - uses: actions/checkout@v3 - - - name: Build HORNET image - run: docker build -f docker/Dockerfile -t hornet:dev . - - - name: Pull additional Docker images - run: | - docker pull gaiaadm/pumba:0.7.4 - docker pull gaiadocker/iproute2:latest - - - name: Run integration tests - run: docker compose -f integration-tests/tester/docker-compose.yml up --abort-on-container-exit --exit-code-from tester --build - - - name: Create logs from tester - if: always() - run: | - sudo chmod 777 integration-tests/logs - docker logs tester &> integration-tests/logs/tester.log - - - name: Save logs as artifacts - if: always() - uses: actions/upload-artifact@v2 - with: - name: ${{ env.TEST_NAME }} - path: integration-tests/logs - - autopeering: - name: autopeering - env: - TEST_NAME: autopeering - runs-on: ubuntu-latest - steps: - - name: Check out code into the Go module directory - uses: actions/checkout@v3 - - - name: Build HORNET image - run: docker build -f docker/Dockerfile -t hornet:dev . - - - name: Pull additional Docker images - run: | - docker pull gaiaadm/pumba:0.7.4 - docker pull gaiadocker/iproute2:latest - - - name: Run integration tests - run: docker compose -f integration-tests/tester/docker-compose.yml up --abort-on-container-exit --exit-code-from tester --build - - - name: Create logs from tester - if: always() - run: | - sudo chmod 777 integration-tests/logs - docker logs tester &> integration-tests/logs/tester.log - - - name: Save logs as artifacts - if: always() - uses: actions/upload-artifact@v2 - with: - name: ${{ env.TEST_NAME }} - path: integration-tests/logs diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 097680997..000000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,61 +0,0 @@ -name: Release - -on: - release: - types: [published] - -jobs: - release-docker: - name: Release Docker - runs-on: ubuntu-latest - steps: - - name: Check out code into the Go module directory - uses: actions/checkout@v3 - - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - - name: Docker meta - id: meta - uses: docker/metadata-action@v4 - with: - images: iotaledger/hornet - tags: | - type=semver,pattern={{version}} - type=semver,pattern={{major}}.{{minor}} - type=semver,pattern={{major}} - type=match,pattern=v(\d+.\d+),suffix=-alpha,group=1,enable=${{ contains(github.ref, '-alpha') }} - type=match,pattern=v(\d+.\d+),suffix=-beta,group=1,enable=${{ contains(github.ref, '-beta') }} - type=match,pattern=v(\d+.\d+),suffix=-rc,group=1,enable=${{ contains(github.ref, '-rc') }} - - - name: Login to DockerHub - uses: docker/login-action@v2 - with: - username: ${{ secrets.IOTALEDGER_DOCKER_USERNAME }} - password: ${{ secrets.IOTALEDGER_DOCKER_PASSWORD }} - - - name: Build and push to Dockerhub - uses: docker/build-push-action@v3 - with: - file: ./docker/Dockerfile - platforms: linux/amd64,linux/arm64 - push: true - tags: ${{ steps.meta.outputs.tags }} - - binaries: - name: Release Binaries - runs-on: ubuntu-latest - container: - image: iotaledger/goreleaser-cgo-cross-compiler:1.21.0 - volumes: [/repo] - steps: - - name: Check out code into the Go module directory - uses: actions/checkout@v3 - - - name: Release HORNET - run: goreleaser --clean - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/snyk-test.yml b/.github/workflows/snyk-test.yml deleted file mode 100644 index 40ba1bd5d..000000000 --- a/.github/workflows/snyk-test.yml +++ /dev/null @@ -1,54 +0,0 @@ -name: Test dependencies with Snyk - -on: - # Run this check every day at 03:00 to find potential new vulnerabilities in the develop branch - schedule: - - cron: "0 3 * * *" - -jobs: - snyk-test: - runs-on: ubuntu-latest - permissions: - actions: read - contents: read - security-events: write - - steps: - - name: Check out code into the Go module directory - uses: actions/checkout@v3 - with: - ref: legacy - - - name: Build HORNET Docker image - run: docker build . --file docker/Dockerfile --tag hornet:latest - - - name: Run Snyk to check for Golang vulnerabilities - uses: snyk/actions/golang@0.3.0 - continue-on-error: true - env: - SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} - with: - args: --org=gohornet --sarif-file-output=snyk-golang.sarif - - - name: Run Snyk to check for Docker image vulnerabilities - uses: snyk/actions/docker@0.3.0 - continue-on-error: true - env: - SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} - with: - image: hornet:latest - # Exclude Go app vulns because those are picked up by the previous scan - # For Docker scans, the SARIF is created by default - args: --org=gohornet --file=Dockerfile --exclude-app-vulns - - - name: Upload Golang results to GitHub Code Scanning - uses: github/codeql-action/upload-sarif@v2 - with: - sarif_file: snyk-golang.sarif - category: snyk-golang - - - name: Upload Docker results to GitHub Code Scanning - uses: github/codeql-action/upload-sarif@v2 - with: - sarif_file: snyk.sarif - category: snyk-docker diff --git a/.github/workflows/test_HORNET.yml b/.github/workflows/test_HORNET.yml deleted file mode 100644 index 71aacdb6c..000000000 --- a/.github/workflows/test_HORNET.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: Test HORNET - -on: - push: - branches: - - legacy - pull_request: - paths-ignore: - - 'documentation/**' - - 'nfpm/**' - - 'private_tangle/**' - - 'scripts/**' - - 'tools/**' - -jobs: - test: - name: Test HORNET - runs-on: ubuntu-latest - steps: - - name: Set up Go - uses: actions/setup-go@v3 - with: - go-version: "1.20" - id: go - - - name: Print Go version - run: go version - - - name: Install Build Essential - run: sudo apt update && sudo apt install build-essential -y - - - name: Check out code into the Go module directory - uses: actions/checkout@v3 - - - name: Test HORNET - uses: nick-invision/retry@v2 - with: - timeout_minutes: 5 - max_attempts: 3 - command: go test `go list ./... | grep -v -e integration-tests | grep -v whiteflag` diff --git a/.github/workflows/test_release.yml b/.github/workflows/test_release.yml index c0c96d02d..4b053839d 100644 --- a/.github/workflows/test_release.yml +++ b/.github/workflows/test_release.yml @@ -24,7 +24,9 @@ jobs: with: fetch-depth: 0 - name: Disable dubious ownership check - run: git config --system --add safe.directory "${{ github.workspace }}" + run: git config --system --add safe.directory "*" + - name: Disable dubious ownership check + run: git config --global --add safe.directory "*" - name: Fetch all tags for GoReleaser run: git fetch --force --tags