Skip to content

Commit

Permalink
Merge branch 'celestiaorg:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
tty47 authored Feb 29, 2024
2 parents 0a4ed6f + d17722d commit 5642035
Show file tree
Hide file tree
Showing 164 changed files with 3,797 additions and 1,391 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
# global owners are only requested if there isn't a more specific
# codeowner specified below. For this reason, the global codeowners
# are often repeated in package-level definitions.
* @renaynay @Wondertan @vgonkivs @distractedm1nd @walldiss
* @renaynay @Wondertan @vgonkivs @distractedm1nd @walldiss @ramin

docs/adr @adlerjohn @liamsi
3 changes: 3 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ updates:
- renaynay
labels:
- kind:deps
ignore:
- dependency-name: "*otel*"
update-types: ["version-update:semver-patch"]
groups:
otel:
patterns:
Expand Down
10 changes: 1 addition & 9 deletions .github/workflows/ci_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ jobs:

- run: git fetch --force --tags

- uses: actions/setup-go@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ needs.setup.outputs.go-version }}

Expand All @@ -138,11 +138,3 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}

# TODO: permission issue, but not worth fixing as this should be refactored
# into the celestiaorg/.github repo, at which point any permission issues will
# be resolved.
#
# docker:
# needs: [release]
# uses: ./.github/workflows/docker-build.yml
48 changes: 48 additions & 0 deletions .github/workflows/github_pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: github-pages

on:
push:
branches:
- main
paths:
- specs/**
pull_request:
paths:
- specs/**
workflow_dispatch:

jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v4

- name: Setup mdBook
uses: peaceiris/actions-mdbook@v1
with:
mdbook-version: "latest"

- name: Build book
run: mdbook build specs

- name: Deploy main
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./specs/book
# keep_files is to prevent PR preview files from being overwritten.
# If we need to overwrite such files, trigger this workflow manually.
keep_files: ${{ github.event_name != 'workflow_dispatch' }}

- name: Deploy PR preview
# Only run this job if the PR was created from a branch on celestiaorg/celestia-node
# because this job will fail for branches from forks.
# https://github.com/celestiaorg/celestia-app/issues/1506
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
uses: rossjrw/pr-preview-action@v1
with:
source-dir: ./specs/book
65 changes: 30 additions & 35 deletions .github/workflows/go-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ concurrency:

jobs:
setup:
name: Setup
runs-on: ubuntu-latest
outputs:
debug: ${{ steps.debug.outputs.debug }}
Expand All @@ -35,12 +36,12 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: actions/setup-go@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ inputs.go-version }}

- name: golangci-lint
uses: golangci/golangci-lint-action@v3.7.0
uses: golangci/golangci-lint-action@v4.0.0
with:
args: --timeout 10m
version: v1.55
Expand All @@ -55,7 +56,7 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: actions/setup-go@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ inputs.go-version }}

Expand All @@ -70,7 +71,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
os: [ubuntu-latest, macos-14]
runs-on: ${{ matrix.os }}
env:
OS: ${{ matrix.os }}
Expand All @@ -79,15 +80,15 @@ jobs:
- uses: actions/checkout@v4

- name: set up go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: ${{ inputs.go-version }}

- name: run unit tests
run: make test-unit ENABLE_VERBOSE=${{ needs.setup.outputs.debug }}

- name: Upload unit test output
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: always() && needs.setup.outputs.debug == 'true'
with:
name: unit-test-output-${{ matrix.os }}
Expand All @@ -97,44 +98,38 @@ jobs:
retention-days: 5

- name: upload coverage
uses: codecov/codecov-action@v3.1.4
uses: codecov/codecov-action@v4.0.2
with:
env_vars: OS
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.txt
name: coverage-${{ matrix.os }}

unit_race_test:
needs: [lint, go_mod_tidy_check]
name: Run Unit Tests with Race Detector
runs-on: ubuntu-latest
# @ramin - Temporarily removed while we figure out getting
# these unit tests consistently running on ubuntu-latest
# and then enabled for macos-latest. We aren't requiring
# unit_race_test to pass for PRs so lets remove and reintroduce
# once green
#
# unit_test_race:
# needs: [lint, go_mod_tidy_check]
# name: Unit Tests with Race Detector (ubuntu-latest)
# runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
# steps:
# - uses: actions/checkout@v4

- name: set up go
uses: actions/setup-go@v4
with:
go-version: ${{ inputs.go-version }}
# - name: set up go
# uses: actions/setup-go@v5
# with:
# go-version: ${{ inputs.go-version }}

- name: execute test run
run: make test-unit-race
# - name: execute test run
# run: make test-unit-race ENABLE_VERBOSE=${{ needs.setup.outputs.debug }}

integration_test:
name: Integration Tests
needs: [lint, go_mod_tidy_check]
name: Run Integration Tests
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: set up go
uses: actions/setup-go@v4
with:
go-version: ${{ inputs.go-version }}

- name: Swamp Tests
run: make test-swamp

- name: Swamp Tests with Race Detector
run: make test-swamp-race
uses: ./.github/workflows/integration-tests.yml
with:
go-version: ${{ inputs.go-version }}
130 changes: 130 additions & 0 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
name: Integration Tests

on:
workflow_call:
inputs:
go-version:
description: 'Go version'
required: true
type: string

jobs:
api_tests:
name: Integration Tests API
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: set up go
uses: actions/setup-go@v5
with:
go-version: ${{ inputs.go-version }}

- name: run API tests
run: make test-integration TAGS=api

blob_tests:
name: Integration Tests Blob
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: set up go
uses: actions/setup-go@v5
with:
go-version: ${{ inputs.go-version }}

- name: run blob tests
run: make test-integration TAGS=blob

da_tests:
name: Da Tests Sync
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: set up go
uses: actions/setup-go@v5
with:
go-version: ${{ inputs.go-version }}

- name: run da tests
run: make test-integration SHORT=true TAGS=da

fraud_tests:
name: Integration Tests Fraud
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: set up go
uses: actions/setup-go@v5
with:
go-version: ${{ inputs.go-version }}

- name: run fraud tests
run: make test-integration TAGS=fraud

nd_tests:
name: Integration Tests ND
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: set up go
uses: actions/setup-go@v5
with:
go-version: ${{ inputs.go-version }}

- name: run nd tests
run: make test-integration TAGS=nd

p2p_tests:
name: Integration Tests p2p
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: set up go
uses: actions/setup-go@v5
with:
go-version: ${{ inputs.go-version }}

- name: run p2p tests
run: make test-integration TAGS=p2p

reconstruction_tests:
name: Integration Tests Reconstruction
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: set up go
uses: actions/setup-go@v5
with:
go-version: ${{ inputs.go-version }}

- name: run reconstruction tests
run: make test-integration SHORT=true TAGS=reconstruction

sync_tests:
name: Integration Tests Sync
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: set up go
uses: actions/setup-go@v5
with:
go-version: ${{ inputs.go-version }}

- name: run sync tests
run: make test-integration SHORT=true TAGS=sync
2 changes: 1 addition & 1 deletion .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v8
- uses: actions/stale@v9
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-stale: 60
Expand Down
2 changes: 2 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,5 @@ changelog:
exclude:
- "^docs:"
- "^test:"
git:
prerelease_suffix: "-"
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ RUN uname -a &&\
CGO_ENABLED=${CGO_ENABLED} GOOS=${TARGETOS} GOARCH=${TARGETARCH} \
make build && make cel-key

FROM docker.io/alpine:3.18.4
FROM docker.io/alpine:3.19.1

# Read here why UID 10001: https://github.com/hexops/dockerfile/blob/main/README.md#do-not-use-a-uid-below-10000
ARG UID=10001
Expand Down
Loading

0 comments on commit 5642035

Please sign in to comment.