Skip to content

Commit

Permalink
resetting because of unverified commit
Browse files Browse the repository at this point in the history
  • Loading branch information
DanFlannel committed Jan 30, 2024
1 parent b360da7 commit 62ee91e
Show file tree
Hide file tree
Showing 89 changed files with 3,083 additions and 746 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/ci-main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: ci main
# continuous integration on push to main

on:
push:
branches:
- main

permissions:
contents: read
pull-requests: read

jobs:
pre-commit:
uses: ./.github/workflows/pre-commit.yml
go-tests:
uses: ./.github/workflows/gotest.yml
go-lint:
uses: ./.github/workflows/golangci-lint.yml
go-releaser:
uses: ./.github/workflows/goreleaser.yml
needs: [pre-commit, go-tests, go-lint]
secrets: inherit
e2e:
uses: ./.github/workflows/e2etest.yml
needs: [go-releaser]
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
"type": "section",
"text": {
"type": "mrkdwn",
"text": "🚨 CI failed on `${{ github.event.workflow_run.head_branch }}`. *${{ github.event.workflow_run.name }}* was unsuccessful."
"text": "🚨 CI failed on `${{ github.event.workflow_run.head_branch }}`."
}
},
{
Expand All @@ -35,7 +35,7 @@ jobs:
},
{
"type": "mrkdwn",
"text": "by: ${{ github.event.workflow_run.head_commit.author.username }} \n url: ${{ github.event.workflow_run.html_url }}"
"text": url: ${{ github.event.workflow_run.html_url }}"
}
]
}
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/ci-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: ci pr
# continuous integration on pull requests to main

on:
pull_request:
branches:
- main

permissions:
contents: read
pull-requests: read

jobs:
pre-commit:
uses: ./.github/workflows/pre-commit.yml
go-tests:
uses: ./.github/workflows/gotest.yml
go-lint:
uses: ./.github/workflows/golangci-lint.yml
File renamed without changes.
19 changes: 19 additions & 0 deletions .github/workflows/e2etest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: e2e tests

on:
workflow_call:

jobs:
e2e_tests:
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 'stable'
- run: |
go install github.com/omni-network/omni/test/e2e/runner
cd test/e2e
./run-multiple.sh manifests/devnet1.toml manifests/simple.toml
12 changes: 1 addition & 11 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,8 @@
name: go lint
# Run this separately from pre-commit since then we get nice inline messages in PRs.

# Run on pull requests and commits to main
on:
pull_request:
push:
branches:
- main

permissions:
contents: read
pull-requests: read
workflow_call:

jobs:
golangci:
Expand All @@ -28,5 +20,3 @@ jobs:
version: v1.55.2
# Verbose with color. Just fail, don't fix issues. Use both annotations and normal output.
args: -v --color=always --fix=false --out-format=colored-line-number,github-actions

# TODO(corver): Notify slack on failure on main
24 changes: 16 additions & 8 deletions .github/workflows/goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
name: go releaser

# Run on all commits to main
on:
push:
branches:
- main
workflow_call:

# TODO(corver): Figure out which images to publish and how to do this via goreleaser.

Expand All @@ -30,10 +27,21 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Push Explorer API to Dockerhub
run: docker push omniops/explorer-api:latest
run: |
docker push omniops/explorer-api:${GITHUB_SHA::7}
docker push omniops/explorer-api:main
- name: Push Indexer to Dockerhub
run: docker push omniops/explorer-indexer:latest
run: |
docker push omniops/explorer-indexer:${GITHUB_SHA::7}
docker push omniops/explorer-indexer:main
- name: Push Halo to Dockerhub
run: docker push omniops/halo:latest
run: |
docker push omniops/halo:${GITHUB_SHA::7}
docker push omniops/halo:main
- name: Push Relayer to Dockerhub
run: docker push omniops/relayer:latest
run: |
docker push omniops/relayer:${GITHUB_SHA::7}
docker push omniops/relayer:main
6 changes: 1 addition & 5 deletions .github/workflows/gotest.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
name: go tests
# Run this separately from pre-commit for nice visual coverage.

# Run on pull requests and commits to main
on:
pull_request:
push:
branches:
- main
workflow_call:

jobs:
unit_tests:
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
name: pre-commit hooks

# Run on pull requests and commits to main
on:
pull_request:
push:
branches:
- main
workflow_call:

jobs:
pre-commit:
Expand Down
16 changes: 12 additions & 4 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,23 @@ dockers:
- ids: [halo]
dockerfile: ./halo/Dockerfile
image_templates:
- omniops/halo:latest
- omniops/halo:{{ .ShortCommit }}
- omniops/halo:{{ if .IsSnapshot }}main{{ else }}latest{{ end }}
- omniops/halo:{{ if .IsSnapshot }}main{{ else }}{{.Tag}}{{ end }}

- ids: [relayer]
dockerfile: ./relayer/Dockerfile
image_templates:
- omniops/relayer:latest
- omniops/relayer:{{ .ShortCommit }}
- omniops/relayer:{{ if .IsSnapshot }}main{{ else }}latest{{ end }}
- omniops/relayer:{{ if .IsSnapshot }}main{{ else }}{{.Tag}}{{ end }}

- ids: [explorer-api]
dockerfile: ./explorer/api/Dockerfile
image_templates:
- omniops/explorer-api:latest
- omniops/explorer-api:{{ .ShortCommit }}
- omniops/explorer-api:{{ if .IsSnapshot }}main{{ else }}latest{{ end }}
- omniops/explorer-api:{{ if .IsSnapshot }}main{{ else }}{{.Tag}}{{ end }}

- ids: [explorer-graphql]
dockerfile: ./explorer/graphql/Dockerfile
Expand All @@ -62,7 +68,9 @@ dockers:
- ids: [explorer-indexer]
dockerfile: ./explorer/indexer/Dockerfile
image_templates:
- omniops/explorer-indexer:latest
- omniops/explorer-indexer:{{ .ShortCommit }}
- omniops/explorer-indexer:{{ if .IsSnapshot }}main{{ else }}latest{{ end }}
- omniops/explorer-indexer:{{ if .IsSnapshot }}main{{ else }}{{.Tag}}{{ end }}

archives:
- format: tar.gz
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,18 +60,18 @@ halo-simnet: ## Runs halo in simnet mode.
.PHONY: devnet-run
devnet-run: ## Runs devnet1 (alias for MANIFEST=devnet1 make e2e-run).
@echo "Creating a docker-compose devnet in ./test/e2e/run/devnet1"
@MANIFEST=devnet1 $(MAKE) e2e-run
@go run github.com/omni-network/omni/test/e2e/runner -f test/e2e/manifests/devnet1.toml -p -s

.PHONY: devnet-stop
devnet-stop: ## Stops devnet1 containers (alias for MANIFEST=devnet1 make e2e-stop).
@echo "Stopping the devnet in ./test/e2e/run/devnet1"
@MANIFEST=devnet1 $(MAKE) e2e-stop
@go run github.com/omni-network/omni/test/e2e/runner -f test/e2e/manifests/devnet1.toml stop

.PHONY: e2e-run
e2e-run: ## Run specific e2e manifest (MANIFEST=single, MANIFEST=simple, etc). Note container remain running after the test.
@if [ -z "$(MANIFEST)" ]; then echo "⚠️ Please specify a manifest: MANIFEST=simple make e2e-run" && exit 1; fi
@echo "Using MANIFEST=$(MANIFEST)"
@go run github.com/omni-network/omni/test/e2e/runner -f test/e2e/manifests/$(MANIFEST).toml -p
@go run github.com/omni-network/omni/test/e2e/runner -f test/e2e/manifests/$(MANIFEST).toml

.PHONY: e2e-logs
e2e-logs: ## Print the docker logs of previously ran e2e manifest (single, simple, etc).
Expand Down
Loading

0 comments on commit 62ee91e

Please sign in to comment.