-
Notifications
You must be signed in to change notification settings - Fork 381
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into dev/zivkovicmilos/bootnodes
- Loading branch information
Showing
519 changed files
with
9,544 additions
and
5,334 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
name: GitHub Bot | ||
|
||
on: | ||
# Watch for changes on PR state, assignees, labels, head branch and draft/ready status | ||
pull_request_target: | ||
types: | ||
- assigned | ||
- unassigned | ||
- labeled | ||
- unlabeled | ||
- opened | ||
- reopened | ||
- synchronize # PR head updated | ||
- converted_to_draft | ||
- ready_for_review | ||
|
||
# Watch for changes on PR comment | ||
issue_comment: | ||
types: [created, edited, deleted] | ||
|
||
# Manual run from GitHub Actions interface | ||
workflow_dispatch: | ||
inputs: | ||
pull-request-list: | ||
description: "PR(s) to process: specify 'all' or a comma separated list of PR numbers, e.g. '42,1337,7890'" | ||
required: true | ||
default: all | ||
type: string | ||
|
||
jobs: | ||
# This job creates a matrix of PR numbers based on the inputs from the various | ||
# events that can trigger this workflow so that the process-pr job below can | ||
# handle the parallel processing of the pull-requests | ||
define-prs-matrix: | ||
name: Define PRs matrix | ||
# Prevent bot from retriggering itself | ||
if: ${{ github.actor != vars.GH_BOT_LOGIN }} | ||
runs-on: ubuntu-latest | ||
permissions: | ||
pull-requests: read | ||
outputs: | ||
pr-numbers: ${{ steps.pr-numbers.outputs.pr-numbers }} | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version-file: contribs/github-bot/go.mod | ||
|
||
- name: Generate matrix from event | ||
id: pr-numbers | ||
working-directory: contribs/github-bot | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: echo "pr-numbers=$(go run . matrix)" >> "$GITHUB_OUTPUT" | ||
|
||
# This job processes each pull request in the matrix individually while ensuring | ||
# that a same PR cannot be processed concurrently by mutliple runners | ||
process-pr: | ||
name: Process PR | ||
needs: define-prs-matrix | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
# Run one job for each PR to process | ||
pr-number: ${{ fromJSON(needs.define-prs-matrix.outputs.pr-numbers) }} | ||
concurrency: | ||
# Prevent running concurrent jobs for a given PR number | ||
group: ${{ matrix.pr-number }} | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version-file: contribs/github-bot/go.mod | ||
|
||
- name: Run GitHub Bot | ||
working-directory: contribs/github-bot | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_BOT_PAT }} | ||
run: go run . check -pr-numbers '${{ matrix.pr-number }}' -verbose |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: genesis-verify | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
paths: | ||
- "misc/deployments/**/genesis.json" | ||
- ".github/workflows/genesis-verify.yml" | ||
|
||
jobs: | ||
verify: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
testnet: ["test5.gno.land"] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Get changed files | ||
id: changed-files | ||
uses: tj-actions/changed-files@v45 | ||
with: | ||
files: "misc/deployments/${{ matrix.testnet }}/genesis.json" | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: "1.22" | ||
|
||
- name: Build gnogenesis | ||
run: make -C contribs/gnogenesis | ||
|
||
- name: Verify each genesis file | ||
run: | | ||
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do | ||
echo "Verifying $file" | ||
gnogenesis verify -genesis-path $file | ||
done | ||
- name: Build gnoland | ||
run: make -C gno.land install.gnoland | ||
|
||
- name: Running latest gnoland with each genesis file | ||
run: | | ||
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do | ||
echo "Running gnoland with $file" | ||
timeout 60s gnoland start -lazy --genesis $file || exit_code=$? | ||
if [ $exit_code -eq 124 ]; then | ||
echo "Gnoland genesis state generated successfully" | ||
else | ||
echo "Gnoland failed to start with $file" | ||
exit 1 | ||
fi | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.