-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
De-dockerize integration test (#106)
* de dockerize integration test * push trigger on master * touchups * bump action versions * parallel jobs * revert to single run * parallel tests * fix script * fix makefile * update script * remove workflow dispatch trigger * consistent workflow file * disable docker integration test * touchups
- Loading branch information
Showing
4 changed files
with
129 additions
and
19 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
name: Integration tests | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
cleanup-runs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: rokroskar/workflow-run-cleanup-action@master | ||
env: | ||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/master'" | ||
|
||
ibc-integration: | ||
runs-on: ubuntu-latest | ||
env: | ||
COMETBFT_VERSION: 0.37.1 | ||
GAIA_VERSION: 6.0.0 | ||
HERMES_VERSION: 1.4.0 | ||
RUST_VERSION: 1.65 | ||
IBC_COMMITISH: master | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Download CometBFT | ||
uses: dsaltares/fetch-gh-release-asset@master | ||
with: | ||
repo: cometbft/cometbft | ||
version: "tags/v${{ env.COMETBFT_VERSION }}" | ||
file: "cometbft_${{ env.COMETBFT_VERSION }}_linux_amd64.tar.gz" | ||
|
||
- name: Download Gaia | ||
uses: dsaltares/fetch-gh-release-asset@master | ||
with: | ||
repo: cosmos/gaia | ||
version: "tags/v${{ env.GAIA_VERSION }}" | ||
file: "gaiad-v${{ env.GAIA_VERSION }}-linux-amd64" | ||
|
||
- name: Download Hermes | ||
uses: dsaltares/fetch-gh-release-asset@master | ||
with: | ||
repo: informalsystems/hermes | ||
version: "tags/v${{ env.HERMES_VERSION }}" | ||
file: "hermes-v${{ env.HERMES_VERSION }}-x86_64-unknown-linux-gnu.tar.gz" | ||
|
||
- name: Setup scripts and directories | ||
working-directory: ci/ | ||
run: | | ||
echo "${HOME}" | ||
mkdir -p ~/local/bin | ||
cp entrypoint.sh ~/local/bin | ||
mkdir -p ~/.cometbft | ||
cp -r cometbft-config/ ~/.cometbft/config | ||
mkdir -p ~/.hermes | ||
cp hermes-config.toml ~/.hermes/config.toml | ||
cp one-chain ~ | ||
cp user_seed.json ~ | ||
cp Makefile .. | ||
cp -r tests/ ~ | ||
- name: Download and setup binaries | ||
run: | | ||
tar -xzf "cometbft_${COMETBFT_VERSION}_linux_amd64.tar.gz" | ||
mv "gaiad-v${GAIA_VERSION}-linux-amd64" gaiad | ||
tar -xzf "hermes-v${HERMES_VERSION}-x86_64-unknown-linux-gnu.tar.gz" | ||
chmod +x cometbft | ||
chmod +x gaiad | ||
chmod +x hermes | ||
mv cometbft gaiad hermes ~/local/bin | ||
- name: Update environment path | ||
run: | | ||
echo "${HOME}/local/bin" >> $GITHUB_PATH | ||
- name: Validate binaries | ||
run: | | ||
cometbft version | ||
gaiad version | ||
hermes version | ||
- uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.cargo | ||
target | ||
~/build | ||
key: ${{ runner.os }}-rust-${{ hashFiles('**/Cargo.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-rust- | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
override: true | ||
|
||
- name: Set environment variables | ||
run: | | ||
echo "BASECOIN_SRC=$(pwd)" >> $GITHUB_ENV | ||
echo "LOG_DIR=$(pwd)/log" >> $GITHUB_ENV | ||
- name: Run integration tests | ||
working-directory: ~ | ||
run: | | ||
mkdir -p "${LOG_DIR}" | ||
entrypoint.sh make test -j4 |
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,18 @@ | ||
.PHONY: test create-channel token-transfer upgrade-client | ||
|
||
test: create-channel token-transfer upgrade-client | ||
|
||
create-channel: | ||
@echo "Creating channel..." | ||
bash ~/tests/create-channel.sh | ||
@echo "Channel created" | ||
|
||
token-transfer: create-channel | ||
@echo "Transferring tokens..." | ||
bash ~/tests/token-transfer.sh | ||
@echo "Tokens transferred" | ||
|
||
upgrade-client: create-channel | ||
@echo "Upgrading client..." | ||
bash ~/tests/upgrade-client.sh | ||
@echo "Client upgraded" |
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