-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: add smoke tests, move tests to tests/e2e (#171)
* add smoke tests, move tests to tests/e2e * add runs-on * fix e2e tests, fix go.mod * run smoke tests every 2 hours, prepare for merge * remove debug runs for smoke tests * readd debug, add timeout to starship-action * remove debug from smoke-test
- Loading branch information
Showing
24 changed files
with
291 additions
and
16 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,118 @@ | ||
name: Smoke tests | ||
|
||
on: | ||
# Run every 2 hours | ||
schedule: | ||
- cron: '0 */2 * * *' | ||
workflow_dispatch: {} | ||
|
||
jobs: | ||
smoke-test-1: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
config-file: [ "one-chain.yaml", "osmojs.yaml", "simapp.yaml", "multi-validator.yaml" ] | ||
fail-fast: false | ||
max-parallel: 4 | ||
|
||
env: | ||
CONFIG_FILE: "tests/smoke/ci/${{ matrix.config-file }}" | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Test infra | ||
id: starship-action | ||
uses: cosmology-tech/starship-action@0.2.14 | ||
with: | ||
values: ${{ env.CONFIG_FILE }} | ||
port-forward: true | ||
version: 0.0.0 | ||
chart: ./charts/devnet | ||
timeout: 10m | ||
|
||
# todo: change this to be post step of the action | ||
- name: Cleanup cluster | ||
if: always() | ||
run: | | ||
helm delete $DEVNET_NAME --debug --namespace $DEVNET_NAMESPACE --wait || true | ||
kubectl delete namespace $DEVNET_NAMESPACE --wait=true || true | ||
env: | ||
DEVNET_NAME: ${{ steps.starship-action.outputs.name }} | ||
DEVNET_NAMESPACE: ${{ steps.starship-action.outputs.namespace }} | ||
|
||
smoke-test-2: | ||
needs: [smoke-test-1] | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
config-file: [ "one-chain.yaml", "osmojs.yaml", "simapp.yaml", "multi-validator.yaml" ] | ||
fail-fast: true | ||
max-parallel: 4 | ||
|
||
env: | ||
CONFIG_FILE: "tests/smoke/ci/${{ matrix.config-file }}" | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Test infra | ||
id: starship-action | ||
uses: cosmology-tech/starship-action@0.2.14 | ||
with: | ||
values: ${{ env.CONFIG_FILE }} | ||
port-forward: true | ||
version: 0.0.0 | ||
chart: ./charts/devnet | ||
timeout: 10m | ||
|
||
# todo: change this to be post step of the action | ||
- name: Cleanup cluster | ||
if: always() | ||
run: | | ||
helm delete $DEVNET_NAME --debug --namespace $DEVNET_NAMESPACE --wait || true | ||
kubectl delete namespace $DEVNET_NAMESPACE --wait=true || true | ||
env: | ||
DEVNET_NAME: ${{ steps.starship-action.outputs.name }} | ||
DEVNET_NAMESPACE: ${{ steps.starship-action.outputs.namespace }} | ||
|
||
smoke-test-3: | ||
needs: [smoke-test-2] | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
config-file: [ "one-chain.yaml", "osmojs.yaml", "simapp.yaml", "multi-validator.yaml" ] | ||
fail-fast: true | ||
max-parallel: 4 | ||
|
||
env: | ||
CONFIG_FILE: "tests/smoke/ci/${{ matrix.config-file }}" | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Test infra | ||
id: starship-action | ||
uses: cosmology-tech/starship-action@0.2.14 | ||
with: | ||
values: ${{ env.CONFIG_FILE }} | ||
port-forward: true | ||
version: 0.0.0 | ||
chart: ./charts/devnet | ||
timeout: 10m | ||
|
||
# todo: change this to be post step of the action | ||
- name: Cleanup cluster | ||
if: always() | ||
run: | | ||
helm delete $DEVNET_NAME --debug --namespace $DEVNET_NAMESPACE --wait || true | ||
kubectl delete namespace $DEVNET_NAMESPACE --wait=true || true | ||
env: | ||
DEVNET_NAME: ${{ steps.starship-action.outputs.name }} | ||
DEVNET_NAMESPACE: ${{ steps.starship-action.outputs.namespace }} |
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 |
---|---|---|
|
@@ -8,6 +8,6 @@ use ( | |
./examples/upgrade-test | ||
./exposer | ||
./registry | ||
./tests | ||
./tools | ||
./tests/e2e | ||
) |
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
File renamed without changes.
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,4 +1,4 @@ | ||
package tests | ||
package e2e | ||
|
||
type Chain struct { | ||
Name string `name:"name" json:"name" yaml:"name"` | ||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,4 +1,4 @@ | ||
package tests | ||
package e2e | ||
|
||
import ( | ||
"fmt" | ||
|
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package tests | ||
package e2e | ||
|
||
import ( | ||
"fmt" | ||
|
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,35 @@ | ||
chains: | ||
- name: osmosis-1 | ||
type: osmosis | ||
numValidators: 2 | ||
ports: | ||
rest: 1313 | ||
rpc: 26653 | ||
exposer: 38083 | ||
resources: | ||
cpu: "0.3" | ||
memory: 600M | ||
faucet: | ||
concurrency: 2 | ||
resources: | ||
cpu: "0.1" | ||
memory: "300M" | ||
|
||
registry: | ||
enabled: true | ||
ports: | ||
rest: 8081 | ||
grpc: 9091 | ||
resources: | ||
cpu: "0.1" | ||
memory: 100M | ||
|
||
resources: | ||
wait: | ||
cpu: "0.1" | ||
memory: 100M | ||
|
||
exposer: | ||
resources: | ||
cpu: "0.1" | ||
memory: 100M |
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,27 @@ | ||
chains: | ||
- name: osmosis-1 | ||
type: osmosis | ||
numValidators: 1 | ||
ports: | ||
rest: 1313 | ||
rpc: 26653 | ||
exposer: 38083 | ||
resources: | ||
cpu: "0.5" | ||
memory: 500M | ||
faucet: | ||
concurrency: 2 | ||
|
||
registry: | ||
enabled: true | ||
ports: | ||
rest: 8081 | ||
grpc: 9091 | ||
resources: | ||
cpu: "0.1" | ||
memory: 100M | ||
|
||
resources: | ||
wait: | ||
cpu: "0.1" | ||
memory: 100M |
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,52 @@ | ||
chains: | ||
- name: osmosis-1 | ||
type: osmosis | ||
image: pyramation/osmosis:v16.1.0 | ||
numValidators: 1 | ||
ports: | ||
rest: 1317 | ||
rpc: 26657 | ||
faucet: 8007 | ||
resources: | ||
cpu: "0.2" | ||
memory: "200M" | ||
- name: cosmos-2 | ||
type: cosmos | ||
numValidators: 1 | ||
ports: | ||
rest: 1313 | ||
rpc: 26653 | ||
faucet: 8003 | ||
resources: | ||
cpu: "0.2" | ||
memory: "200M" | ||
|
||
relayers: | ||
- name: osmos-cosmos | ||
type: hermes | ||
replicas: 1 | ||
chains: | ||
- osmosis-1 | ||
- cosmos-2 | ||
resources: | ||
cpu: "0.1" | ||
memory: "100M" | ||
|
||
registry: | ||
enabled: true | ||
ports: | ||
rest: 8081 | ||
grpc: 9091 | ||
resources: | ||
cpu: "0.1" | ||
memory: "100M" | ||
|
||
exposer: | ||
resources: | ||
cpu: "0.1" | ||
memory: "100M" | ||
|
||
faucet: | ||
resources: | ||
cpu: "0.1" | ||
memory: "100M" |
Oops, something went wrong.