-
Notifications
You must be signed in to change notification settings - Fork 108
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into jkan2/test-lstn
- Loading branch information
Showing
236 changed files
with
11,503 additions
and
8,396 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
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,111 @@ | ||
name: sim | ||
|
||
on: | ||
push: | ||
branches: | ||
- develop | ||
pull_request: | ||
types: [opened, synchronize, labeled] | ||
schedule: | ||
- cron: "0 6 * * *" | ||
workflow_dispatch: | ||
inputs: | ||
make-targets: | ||
description: 'Comma separated list of make targets to run (e.g., test-sim-nondeterminism, test-sim-fullappsimulation)' | ||
required: true | ||
default: 'test-sim-nondeterminism' | ||
|
||
concurrency: | ||
group: simulation-${{ github.head_ref || github.sha }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
changed-files: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
modified_files: ${{ steps.changes.outputs.modified_files }} | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Get changed files in x directory | ||
id: changes | ||
run: | | ||
echo "::set-output name=modified_files::$(git diff --name-only --diff-filter=ACMRT ${{ github.event.pull_request.base.sha }} ${{ github.sha }} | grep '^x/' | xargs)" | ||
matrix-conditionals: | ||
needs: changed-files | ||
if: | | ||
contains(github.event.pull_request.labels.*.name, 'SIM_TESTS') || needs.changed-files.outputs.modified_files | ||
runs-on: ubuntu-22.04 | ||
outputs: | ||
SIM_TEST_NOND: ${{ steps.matrix-conditionals.outputs.SIM_TEST_NOND }} | ||
SIM_TEST_FULL: ${{ steps.matrix-conditionals.outputs.SIM_TEST_FULL }} | ||
SIM_TEST_IMPORT_EXPORT: ${{ steps.matrix-conditionals.outputs.SIM_TEST_IMPORT_EXPORT }} | ||
SIM_TEST_AFTER_IMPORT: ${{ steps.matrix-conditionals.outputs.SIM_TEST_AFTER_IMPORT }} | ||
steps: | ||
- id: matrix-conditionals | ||
uses: actions/github-script@v7 | ||
with: | ||
script: | | ||
const makeTargetsInput = context.payload.inputs ? context.payload.inputs['make-targets'] : null; | ||
const defaultTargets = ['test-sim-nondeterminism', 'test-sim-fullappsimulation', 'test-sim-import-export', 'test-sim-after-import']; | ||
const makeTargets = makeTargetsInput ? makeTargetsInput.split(',') : defaultTargets; | ||
core.setOutput('SIM_TEST_NOND', makeTargets.includes('test-sim-nondeterminism')); | ||
core.setOutput('SIM_TEST_FULL', makeTargets.includes('test-sim-fullappsimulation')); | ||
core.setOutput('SIM_TEST_IMPORT_EXPORT', makeTargets.includes('test-sim-import-export')); | ||
core.setOutput('SIM_TEST_AFTER_IMPORT', makeTargets.includes('test-sim-after-import')); | ||
simulation-tests: | ||
needs: | ||
- matrix-conditionals | ||
if: | | ||
contains(github.event.pull_request.labels.*.name, 'SIM_TESTS') || needs.changed-files.outputs.modified_files | ||
runs-on: ubuntu-22.04 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- make-target: "test-sim-nondeterminism" | ||
condition: ${{ needs.matrix-conditionals.outputs.SIM_TEST_NOND == 'true' }} | ||
- make-target: "test-sim-fullappsimulation" | ||
condition: ${{ needs.matrix-conditionals.outputs.SIM_TEST_FULL == 'true' }} | ||
- make-target: "test-sim-import-export" | ||
condition: ${{ needs.matrix-conditionals.outputs.SIM_TEST_IMPORT_EXPORT == 'true' }} | ||
- make-target: "test-sim-after-import" | ||
condition: ${{ needs.matrix-conditionals.outputs.SIM_TEST_AFTER_IMPORT == 'true' }} | ||
name: ${{ matrix.make-target }} | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: '1.22' | ||
|
||
- name: Install dependencies | ||
run: make runsim | ||
|
||
- name: Run ${{ matrix.make-target }} | ||
if: ${{ matrix.condition }} | ||
run: | | ||
make ${{ matrix.make-target }} | ||
sim-ok: | ||
needs: | ||
- simulation-tests | ||
if: | | ||
contains(github.event.pull_request.labels.*.name, 'SIM_TESTS') || needs.changed-files.outputs.modified_files | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Aggregate Results | ||
run: | | ||
result="${{ needs.simulation-tests.result }}" | ||
if [[ $result == "success" || $result == "skipped" ]]; then | ||
exit 0 | ||
else | ||
exit 1 | ||
fi |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# syntax=ghcr.io/zeta-chain/docker-dockerfile:1.9-labs | ||
# check=error=true | ||
FROM ghcr.io/zeta-chain/golang:1.22.5-bookworm AS base-build | ||
FROM ghcr.io/zeta-chain/golang:1.22.7-bookworm AS base-build | ||
|
||
ENV GOPATH=/go | ||
ENV GOOS=linux | ||
|
@@ -27,10 +27,10 @@ RUN --mount=type=cache,target="/root/.cache/go-build" \ | |
NODE_COMMIT=${NODE_COMMIT} \ | ||
make install install-zetae2e | ||
|
||
FROM ghcr.io/zeta-chain/golang:1.22.5-bookworm AS cosmovisor-build | ||
FROM ghcr.io/zeta-chain/golang:1.22.7-bookworm AS cosmovisor-build | ||
RUN go install cosmossdk.io/tools/cosmovisor/cmd/[email protected] | ||
|
||
FROM ghcr.io/zeta-chain/golang:1.22.5-bookworm AS base-runtime | ||
FROM ghcr.io/zeta-chain/golang:1.22.7-bookworm AS base-runtime | ||
|
||
RUN apt update && \ | ||
apt install -yq jq yq curl tmux python3 openssh-server iputils-ping iproute2 bind9-host && \ | ||
|
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
Oops, something went wrong.