diff --git a/.github/workflows/docker_linux.yml b/.github/workflows/docker_linux.yml
index d87b4348e5c..25c6c044f44 100644
--- a/.github/workflows/docker_linux.yml
+++ b/.github/workflows/docker_linux.yml
@@ -3,11 +3,7 @@ on:
schedule:
- cron: "0 23 * * *"
workflow_dispatch:
- inputs:
- network:
- description: 'NETWORK'
- required: true
- default: 'mainnet'
+
jobs:
build:
@@ -27,4 +23,30 @@ jobs:
docker-compose up -d
./scripts/connect_wallet.rb
env:
- NETWORK: ${{ github.event.inputs.network || 'mainnet' }}
+ NETWORK: preprod
+ report:
+ needs: [build]
+ if: always()
+ runs-on: ubuntu-latest
+ steps:
+ - name: Slack Notification on failure
+ if: needs.build.result == 'failure'
+ uses: rtCamp/action-slack-notify@v2
+ env:
+ SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
+ SLACK_ICON_EMOJI: ':poop:'
+ SLACK_USERNAME: 'GitHub Action'
+ SLACK_MESSAGE: |
+ *Job Link:* ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
+ SLACK_COLOR: '#FF0000'
+
+ - name: Slack Notification on success
+ if: needs.build.result == 'success'
+ uses: rtCamp/action-slack-notify@v2
+ env:
+ SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
+ SLACK_ICON_EMOJI: ':rocket:'
+ SLACK_USERNAME: 'GitHub Action'
+ SLACK_MESSAGE: |
+ *Job Link:* ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
+ SLACK_COLOR: '#00FF00'
\ No newline at end of file
diff --git a/.github/workflows/docker_macos.yml b/.github/workflows/docker_macos.yml
index b7f03bc11a1..4b5c5c7be40 100644
--- a/.github/workflows/docker_macos.yml
+++ b/.github/workflows/docker_macos.yml
@@ -3,11 +3,7 @@ on:
schedule:
- cron: "0 23 * * *"
workflow_dispatch:
- inputs:
- network:
- description: 'NETWORK'
- required: true
- default: 'mainnet'
+
jobs:
build:
@@ -17,7 +13,7 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3.2.0
- - uses: docker-practice/actions-setup-docker@1.0.11
+ - uses: docker-practice/actions-setup-docker@master
- uses: ruby/setup-ruby@v1.127.0
with:
ruby-version: 2.7.1
@@ -28,4 +24,30 @@ jobs:
docker-compose up -d
./scripts/connect_wallet.rb
env:
- NETWORK: ${{ github.event.inputs.network || 'mainnet' }}
+ NETWORK: preprod
+ report:
+ needs: [build]
+ if: always()
+ runs-on: ubuntu-latest
+ steps:
+ - name: Slack Notification on failure
+ if: needs.build.result == 'failure'
+ uses: rtCamp/action-slack-notify@v2
+ env:
+ SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
+ SLACK_ICON_EMOJI: ':poop:'
+ SLACK_USERNAME: 'GitHub Action'
+ SLACK_MESSAGE: |
+ *Job Link:* ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
+ SLACK_COLOR: '#FF0000'
+
+ - name: Slack Notification on success
+ if: needs.build.result == 'success'
+ uses: rtCamp/action-slack-notify@v2
+ env:
+ SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
+ SLACK_ICON_EMOJI: ':rocket:'
+ SLACK_USERNAME: 'GitHub Action'
+ SLACK_MESSAGE: |
+ *Job Link:* ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
+ SLACK_COLOR: '#00FF00'
diff --git a/.github/workflows/e2e-docker.yml b/.github/workflows/e2e-docker.yml
index 99bb421c4fa..75a209cc3a0 100644
--- a/.github/workflows/e2e-docker.yml
+++ b/.github/workflows/e2e-docker.yml
@@ -13,10 +13,6 @@ on:
description: 'Wallet tag (docker)'
required: true
default: 'dev-master'
- network:
- description: 'Network'
- required: true
- default: 'preprod'
tags:
description: 'Test tags (all, light, offchain...)'
default: 'all'
@@ -30,6 +26,14 @@ jobs:
runs-on: ubuntu-latest
+ env:
+ TESTS_E2E_FIXTURES: ${{ secrets.TESTS_E2E_FIXTURES }}
+ BUILDKITE_API_TOKEN: ${{ secrets.BUILDKITE_TOKEN_READ_BUILDS_ARTIFACTS }}
+ WALLET: ${{ github.event.inputs.walletTag || 'dev-master' }}
+ TESTS_E2E_TOKEN_METADATA: https://metadata.cardano-testnet.iohkdev.io/
+ TAGS: ${{ github.event.inputs.tags || 'all' }}
+ E2E_DOCKER_RUN: 1
+
steps:
- uses: actions/checkout@v3.2.0
@@ -55,31 +59,37 @@ jobs:
run: bundle install
- name: ⚙️ Setup (get latest bins and configs and decode fixtures)
- run: rake setup[$NETWORK]
+ run: rake setup[preprod]
- - name: 🕒 Get Date/Time
- id: date-time
- shell: bash
- run: |
- echo "value=$(rake datetime)" >> $GITHUB_OUTPUT
- name: 💾 Cache node db
- id: cache
+ id: cache-node
uses: actions/cache@v3
with:
- path: test/e2e/state/node_db/${{ env.NETWORK }}
- key: node-db-docker-${{ env.NETWORK }}-${{ steps.date-time.outputs.value }}
- restore-keys: |
- node-db-docker-${{ env.NETWORK }}-
- node-db-Linux-${{ env.NETWORK }}-
+ path: test/e2e/state/node_db/preprod
+ key: node-db-docker-linux-preprod
+
+ - name: Fetch preprod snapshot
+ if: steps.cache-node.outputs.cache-hit != 'true'
+ run: |
+ cd state
+ mkdir node_db
+ cd node_db
+ mkdir preprod
+ cd preprod
+ curl -s https://downloads.csnapshots.io/snapshots/testnet/testnet-db-snapshot.json \
+ | jq -r .[].file_name > snapshot.json
+ curl -o - \
+ https://downloads.csnapshots.io/snapshots/testnet/$(cat snapshot.json) \
+ | lz4 -c -d - | tar -x -C .
+ mv db/* .
- name: 💾 Cache wallet db
id: cache-wallet
uses: actions/cache@v3
with:
- path: test/e2e/state/wallet_db/${{ env.NETWORK }}
- key: wallet-db3-${{ runner.os }}-${{ env.NETWORK }}-${{ steps.date-time.outputs.value }}
- restore-keys: wallet-db3-docker-${{ env.NETWORK }}-
+ path: test/e2e/state/wallet_db/preprod
+ key: wallet-db-docker-linux-preprod
- name: 🚀 Start node and wallet
run: |
@@ -87,9 +97,9 @@ jobs:
echo "Node: ${{steps.cardano-node-tag.outputs.NODE_TAG}}"
NODE=${{steps.cardano-node-tag.outputs.NODE_TAG}} \
- NODE_CONFIG_PATH=`pwd`/state/configs/$NETWORK \
- DATA=`pwd`/state/node_db/$NETWORK \
- WALLET_DATA=`pwd`/state/wallet_db/$NETWORK \
+ NODE_CONFIG_PATH=`pwd`/state/configs/preprod \
+ DATA=`pwd`/state/node_db/preprod \
+ WALLET_DATA=`pwd`/state/wallet_db/preprod \
docker-compose -f docker-compose-test.yml up --detach
- name: 🔍 Display versions
@@ -111,17 +121,44 @@ jobs:
uses: actions/upload-artifact@v3
if: always()
with:
- name: ${{ runner.os }}-docker-logs
+ name: linux-docker-logs
path: test/e2e/state/logs
- name: Stop docker-compose
- run: NODE_CONFIG_PATH=`pwd`/state/configs/$NETWORK docker-compose -f docker-compose-test.yml down
- env:
- TESTS_E2E_FIXTURES: ${{ secrets.TESTS_E2E_FIXTURES }}
- BUILDKITE_API_TOKEN: ${{ secrets.BUILDKITE_TOKEN_READ_BUILDS_ARTIFACTS }}
- NETWORK: ${{ github.event.inputs.network || 'preprod' }}
- WALLET: ${{ github.event.inputs.walletTag || 'dev-master' }}
- TESTS_E2E_TOKEN_METADATA: https://metadata.cardano-testnet.iohkdev.io/
- NODE_DB_CACHE: ${{ github.event.inputs.node_db_cache || 'GH' }}
- TAGS: ${{ github.event.inputs.tags || 'all' }}
- E2E_DOCKER_RUN: 1
+ run: NODE_CONFIG_PATH=`pwd`/state/configs/preprod docker-compose -f docker-compose-test.yml down
+
+ - name: 💾 GH Save Cache of node db
+ if: always()
+ uses: actions/cache/save@v3
+ with:
+ path: test/e2e/state/node_db/preprod
+ key: node-db-docker-linux-preprod
+
+ - name: 💾 GH Save Cache of wallet db
+ if: always()
+ uses: actions/cache/save@v3
+ with:
+ path: test/e2e/state/wallet_db/preprod
+ key: wallet-db-docker-linux-preprod
+
+ - name: Slack Notification on failure
+ if: failure()
+ uses: rtCamp/action-slack-notify@v2
+ env:
+ SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
+ SLACK_ICON_EMOJI: ':poop:'
+ SLACK_USERNAME: 'GitHub Action'
+ SLACK_MESSAGE: |
+ *Job Link:* ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
+ SLACK_COLOR: '#FF0000'
+
+ - name: Slack Notification on success
+ if: success()
+ uses: rtCamp/action-slack-notify@v2
+ env:
+ SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
+ SLACK_ICON_EMOJI: ':rocket:'
+ SLACK_USERNAME: 'GitHub Action'
+ SLACK_MESSAGE: |
+ *Job Link:* ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
+ SLACK_COLOR: '#00FF00'
\ No newline at end of file
diff --git a/.github/workflows/e2e-linux.yml b/.github/workflows/e2e-linux.yml
index 8e43836d996..42dd0dd6d10 100644
--- a/.github/workflows/e2e-linux.yml
+++ b/.github/workflows/e2e-linux.yml
@@ -5,10 +5,7 @@ on:
- cron: "0 20 * * *"
workflow_dispatch:
inputs:
- network:
- description: 'Network'
- required: true
- default: 'preprod'
+
branch:
description: 'Run tests against branch'
default: 'master'
@@ -24,6 +21,12 @@ jobs:
test:
runs-on: ubuntu-latest
+ env:
+ TESTS_E2E_FIXTURES: ${{ secrets.TESTS_E2E_FIXTURES }}
+ BUILDKITE_API_TOKEN: ${{ secrets.BUILDKITE_TOKEN_READ_BUILDS_ARTIFACTS }}
+ BRANCH: ${{ github.event.inputs.branch || '' }}
+ TAGS: ${{ github.event.inputs.tags || 'all' }}
+
steps:
- uses: actions/checkout@v3.2.0
@@ -36,38 +39,44 @@ jobs:
- name: Install dependencies
run: bundle install
- - name: 🕒 Get Date/Time
- id: date-time
- shell: bash
- run: |
- echo "value=$(rake datetime)" >> $GITHUB_OUTPUT
-
- - name: 💾 GH Cache node db
- id: cache
+ - name: 💾 GH Restore Cache of node db
+ id: cache-node
uses: actions/cache@v3
with:
- path: test/e2e/state/node_db/${{ env.NETWORK }}
- key: node-db-${{ runner.os }}-${{ env.NETWORK }}-${{ steps.date-time.outputs.value }}
- restore-keys: |
- node-db-${{ runner.os }}-${{ env.NETWORK }}-
+ path: test/e2e/state/node_db/preprod
+ key: node-db-e2e-linux-preprod
- name: 💾 Cache wallet db
id: cache-wallet
uses: actions/cache@v3
with:
- path: test/e2e/state/wallet_db/${{ env.NETWORK }}
- key: wallet-db3-${{ runner.os }}-${{ env.NETWORK }}-${{ steps.date-time.outputs.value }}
- restore-keys: |
- wallet-db3-${{ runner.os }}-${{ env.NETWORK }}-
+ path: test/e2e/state/wallet_db/preprod
+ key: wallet-db-e2e-linux-preprod
+
+ - name: Fetch preprod snapshot
+ if: steps.cache-node.outputs.cache-hit != 'true'
+ run: |
+ mkdir state
+ cd state
+ mkdir node_db
+ cd node_db
+ mkdir preprod
+ cd preprod
+ curl -s https://downloads.csnapshots.io/snapshots/testnet/testnet-db-snapshot.json \
+ | jq -r .[].file_name > snapshot.json
+ curl -o - \
+ https://downloads.csnapshots.io/snapshots/testnet/$(cat snapshot.json) \
+ | lz4 -c -d - | tar -x -C .
+ mv db/* .
- name: ⚙️ Setup (get latest bins and configs and decode fixtures)
- run: rake setup[$NETWORK,$BRANCH]
+ run: rake setup[preprod,$BRANCH]
- name: 🔍 Display versions
run: rake display_versions
- name: 🚀 Start node and wallet
- run: rake start_node_and_wallet[$NETWORK]
+ run: rake start_node_and_wallet[preprod]
- name: ⏳ Wait until node is synced
run: rake wait_until_node_synced
@@ -76,22 +85,50 @@ jobs:
run: rake spec SPEC_OPTS="-t $TAGS"
- name: 🏁 Stop node and wallet
- run: rake stop_node_and_wallet[$NETWORK]
+ run: rake stop_node_and_wallet[preprod]
+
+ - name: 💾 GH Save Cache of node db
+ if: always()
+ uses: actions/cache/save@v3
+ with:
+ path: test/e2e/state/node_db/preprod
+ key: node-db-e2e-linux-preprod
+
+ - name: 💾 GH Save Cache of wallet db
+ if: always()
+ uses: actions/cache/save@v3
+ with:
+ path: test/e2e/state/wallet_db/preprod
+ key: wallet-db-e2e-linux-preprod
- name: 📎 Upload state
uses: actions/upload-artifact@v3
if: always()
with:
- name: ${{ runner.os }}-state
+ name: linux-state
path: |
test/e2e/state/logs
test/e2e/state/configs
test/e2e/state/wallet_db
- env:
- TESTS_E2E_FIXTURES: ${{ secrets.TESTS_E2E_FIXTURES }}
- BUILDKITE_API_TOKEN: ${{ secrets.BUILDKITE_TOKEN_READ_BUILDS_ARTIFACTS }}
- NETWORK: ${{ github.event.inputs.network || 'preprod' }}
- BRANCH: ${{ github.event.inputs.branch || '' }}
- NODE_DB_CACHE: ${{ github.event.inputs.node_db_cache || 'GH' }}
- TAGS: ${{ github.event.inputs.tags || 'all' }}
+ - name: Slack Notification on failure
+ if: failure()
+ uses: rtCamp/action-slack-notify@v2
+ env:
+ SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
+ SLACK_ICON_EMOJI: ':poop:'
+ SLACK_USERNAME: 'GitHub Action'
+ SLACK_MESSAGE: |
+ *Job Link:* ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
+ SLACK_COLOR: '#FF0000'
+
+ - name: Slack Notification on success
+ if: success()
+ uses: rtCamp/action-slack-notify@v2
+ env:
+ SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
+ SLACK_ICON_EMOJI: ':rocket:'
+ SLACK_USERNAME: 'GitHub Action'
+ SLACK_MESSAGE: |
+ *Job Link:* ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
+ SLACK_COLOR: '#00FF00'
\ No newline at end of file
diff --git a/.github/workflows/e2e-macos.yml b/.github/workflows/e2e-macos.yml
index baf69005532..3b4703e3ab7 100644
--- a/.github/workflows/e2e-macos.yml
+++ b/.github/workflows/e2e-macos.yml
@@ -5,10 +5,7 @@ on:
- cron: "0 20 * * *"
workflow_dispatch:
inputs:
- network:
- description: 'Network'
- required: true
- default: 'preprod'
+
branch:
description: 'Run tests against branch'
default: 'master'
@@ -24,6 +21,12 @@ jobs:
test:
runs-on: macos-latest
+ env:
+ TESTS_E2E_FIXTURES: ${{ secrets.TESTS_E2E_FIXTURES }}
+ BUILDKITE_API_TOKEN: ${{ secrets.BUILDKITE_TOKEN_READ_BUILDS_ARTIFACTS }}
+ BRANCH: ${{ github.event.inputs.branch || '' }}
+ TAGS: ${{ github.event.inputs.tags || 'all' }}
+
steps:
- uses: actions/checkout@v3
@@ -39,39 +42,45 @@ jobs:
- name: Prepare MacOS
run: brew install screen
- - name: 🕒 Get Date/Time
- id: date-time
- shell: bash
- run: |
- echo "value=$(rake datetime)" >> $GITHUB_OUTPUT
-
- name: 💾 GH Cache node db
- id: cache
+ id: cache-node
uses: actions/cache@v3
with:
- path: test/e2e/state/node_db/${{ env.NETWORK }}
- key: node-db-${{ runner.os }}-${{ env.NETWORK }}-${{ steps.date-time.outputs.value }}
- restore-keys: |
- node-db-${{ runner.os }}-${{ env.NETWORK }}-
- node-db-Linux-${{ env.NETWORK }}-
+ path: test/e2e/state/node_db/preprod
+ key: node-db-e2e-macos-preprod
- name: 💾 Cache wallet db
id: cache-wallet
uses: actions/cache@v3
with:
- path: test/e2e/state/wallet_db/${{ env.NETWORK }}
- key: wallet-db3-${{ runner.os }}-${{ env.NETWORK }}-${{ steps.date-time.outputs.value }}
- restore-keys: |
- wallet-db3-${{ runner.os }}-${{ env.NETWORK }}-
+ path: test/e2e/state/wallet_db/preprod
+ key: wallet-db-e2-macos-preprod
+
+ - name: Fetch preprod snapshot
+ if: steps.cache-node.outputs.cache-hit != 'true'
+ run: |
+ mkdir state
+ cd state
+ mkdir node_db
+ cd node_db
+ mkdir preprod
+ cd preprod
+ curl -s https://downloads.csnapshots.io/snapshots/testnet/testnet-db-snapshot.json \
+ | jq -r .[].file_name > snapshot.json
+ curl -o - \
+ https://downloads.csnapshots.io/snapshots/testnet/$(cat snapshot.json) \
+ | lz4 -c -d - | tar -x -C .
+ mv db/* .
+
- name: ⚙️ Setup (get latest bins and configs and decode fixtures)
- run: rake setup[$NETWORK,$BRANCH]
+ run: rake setup[preprod,$BRANCH]
- name: 🔍 Display versions
run: rake display_versions
- name: 🚀 Start node and wallet
- run: rake start_node_and_wallet[$NETWORK]
+ run: rake start_node_and_wallet[preprod]
- name: ⏳ Wait until node is synced
run: rake wait_until_node_synced
@@ -80,22 +89,55 @@ jobs:
run: rake spec SPEC_OPTS="-t $TAGS"
- name: 🏁 Stop node and wallet
- run: rake stop_node_and_wallet[$NETWORK]
+ run: rake stop_node_and_wallet[preprod]
+
+ - name: 💾 GH Save Cache of node db
+ if: always()
+ uses: actions/cache/save@v3
+ with:
+ path: test/e2e/state/node_db/preprod
+ key: node-db-e2e-macos-preprod
+
+ - name: 💾 GH Save Cache of wallet db
+ if: always()
+ uses: actions/cache/save@v3
+ with:
+ path: test/e2e/state/wallet_db/preprod
+ key: wallet-db-e2e-macos-preprod
- name: 📎 Upload state
uses: actions/upload-artifact@v3
if: always()
with:
- name: ${{ runner.os }}-state
+ name: macos-state
path: |
test/e2e/state/logs
test/e2e/state/configs
test/e2e/state/wallet_db
+ report:
+ needs: test
+ if: always()
+ runs-on: ubuntu-latest
+ steps:
- env:
- TESTS_E2E_FIXTURES: ${{ secrets.TESTS_E2E_FIXTURES }}
- BUILDKITE_API_TOKEN: ${{ secrets.BUILDKITE_TOKEN_READ_BUILDS_ARTIFACTS }}
- NETWORK: ${{ github.event.inputs.network || 'preprod' }}
- BRANCH: ${{ github.event.inputs.branch || '' }}
- NODE_DB_CACHE: ${{ github.event.inputs.node_db_cache || 'GH' }}
- TAGS: ${{ github.event.inputs.tags || 'all' }}
+ - name: Slack Notification on failure
+ if: needs.test.result != 'success'
+ uses: rtCamp/action-slack-notify@v2
+ env:
+ SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
+ SLACK_ICON_EMOJI: ':poop:'
+ SLACK_USERNAME: 'GitHub Action'
+ SLACK_MESSAGE: |
+ *Job Link:* ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
+ SLACK_COLOR: '#FF0000'
+
+ - name: Slack Notification on success
+ if: needs.test.result == 'success'
+ uses: rtCamp/action-slack-notify@v2
+ env:
+ SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
+ SLACK_ICON_EMOJI: ':rocket:'
+ SLACK_USERNAME: 'GitHub Action'
+ SLACK_MESSAGE: |
+ *Job Link:* ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
+ SLACK_COLOR: '#00FF00'
diff --git a/.github/workflows/e2e-windows.yml b/.github/workflows/e2e-windows.yml
index e7632dd28f7..ea2bdc9f345 100644
--- a/.github/workflows/e2e-windows.yml
+++ b/.github/workflows/e2e-windows.yml
@@ -5,10 +5,6 @@ on:
- cron: "0 20 * * *"
workflow_dispatch:
inputs:
- network:
- description: 'Network'
- required: true
- default: 'preprod'
branch:
description: 'Run tests against branch'
default: 'master'
@@ -17,8 +13,17 @@ on:
default: 'all'
jobs:
test:
+
runs-on: windows-latest
+ env:
+ NETWORK: preprod
+ BUILDKITE_API_TOKEN: ${{ secrets.BUILDKITE_TOKEN_READ_BUILDS_ARTIFACTS }}
+ TESTS_E2E_FIXTURES: ${{ secrets.TESTS_E2E_FIXTURES }}
+ BRANCH: ${{ github.event.inputs.branch || 'master' }}
+ TAGS: ${{ github.event.inputs.tags || 'all' }}
+
+
steps:
- name: Check space
run: Get-PSDrive
@@ -52,6 +57,8 @@ jobs:
choco install wget
choco install unzip
choco install nssm
+ choco install archiver
+
- name: 🕒 Get Date/Time
working-directory: C:/cardano-wallet/test/e2e
@@ -61,27 +68,37 @@ jobs:
echo "value=$(rake datetime)" >> $GITHUB_OUTPUT
- name: 💾 GH Cache node db
- id: cache
+ id: cache-node
uses: actions/cache@v3
with:
- path: C:/cardano-wallet/test/e2e/state/node_db/${{ env.NETWORK }}
- key: node-db-${{ runner.os }}-${{ env.NETWORK }}-${{ steps.date-time.outputs.value }}
- restore-keys: |
- node-db-${{ runner.os }}-${{ env.NETWORK }}-
- node-db-Linux-${{ env.NETWORK }}-
+ path: C:/cardano-wallet/test/e2e/state/node_db/preprod
+ key: node-db-e2e-windows-preprod
- name: 💾 Cache wallet db
id: cache-wallet
uses: actions/cache@v3
with:
- path: C:/cardano-wallet/test/e2e/state/wallet_db/${{ env.NETWORK }}
- key: wallet-db3-${{ runner.os }}-${{ env.NETWORK }}-${{ steps.date-time.outputs.value }}
- restore-keys: |
- wallet-db3-${{ runner.os }}-${{ env.NETWORK }}-
+ path: C:/cardano-wallet/test/e2e/state/wallet_db/preprod
+ key: wallet-db-e2e-windows-preprod
+
+ - name: Fetch preprod snapshot
+ if: steps.cache-node.outputs.cache-hit != 'true'
+ working-directory: C:/cardano-wallet/test/e2e
+ run: |
+ mkdir state
+ cd state
+ mkdir node_db
+ cd node_db
+ mkdir preprod
+ cd preprod
+ curl -s https://downloads.csnapshots.io/snapshots/testnet/testnet-db-snapshot.json | jq -r .[].file_name > snapshot.json
+ curl -o snapshot.tar.lz4 https://downloads.csnapshots.io/snapshots/testnet/$(cat snapshot.json)
+ arc unarchive snapshot.tar.lz4
+ mv db/* .
- name: ⚙️ Setup (get latest bins and configs and decode fixtures)
working-directory: C:/cardano-wallet/test/e2e
- run: rake setup[%NETWORK%,%BRANCH%]
+ run: rake setup[preprod,%BRANCH%]
- name: 🔍 Display versions
working-directory: C:/cardano-wallet/test/e2e
@@ -89,7 +106,7 @@ jobs:
- name: 🚀 Start node and wallet
working-directory: C:/cardano-wallet/test/e2e
- run: rake start_node_and_wallet[%NETWORK%]
+ run: rake start_node_and_wallet[preprod]
- name: ⏳ Wait until node is synced
working-directory: C:/cardano-wallet/test/e2e
@@ -101,22 +118,57 @@ jobs:
- name: 🏁 Stop node and wallet
working-directory: C:/cardano-wallet/test/e2e
- run: rake stop_node_and_wallet[%NETWORK%]
+ run: rake stop_node_and_wallet[preprod]
+
+ - name: 💾 GH Save Cache of node db
+ if: always()
+ uses: actions/cache/save@v3
+ with:
+ path: test/e2e/state/node_db/preprod
+ key: node-db-e2e-windows-preprod
+
+ - name: 💾 GH Save Cache of wallet db
+ if: always()
+ uses: actions/cache/save@v3
+ with:
+ path: test/e2e/state/wallet_db/preprod
+ key: wallet-db-e2e-windows-preprod
- name: 📎 Upload state
uses: actions/upload-artifact@v3
if: always()
with:
- name: ${{ runner.os }}-state
+ name: windows-state
path: |
C:/cardano-wallet/test/e2e/state/logs
C:/cardano-wallet/test/e2e/state/configs
C:/cardano-wallet/test/e2e/state/wallet_db
- env:
- NETWORK: ${{ github.event.inputs.network || 'preprod' }}
- BUILDKITE_API_TOKEN: ${{ secrets.BUILDKITE_TOKEN_READ_BUILDS_ARTIFACTS }}
- TESTS_E2E_FIXTURES: ${{ secrets.TESTS_E2E_FIXTURES }}
- BRANCH: ${{ github.event.inputs.branch || 'master' }}
- NODE_DB_CACHE: ${{ github.event.inputs.node_db_cache || 'GH' }}
- TAGS: ${{ github.event.inputs.tags || 'all' }}
+
+
+ report:
+ needs: [test]
+ if: always()
+ runs-on: ubuntu-latest
+ steps:
+ - name: Slack Notification on failure
+ if: needs.test.result != 'success'
+ uses: rtCamp/action-slack-notify@v2
+ env:
+ SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
+ SLACK_ICON_EMOJI: ':poop:'
+ SLACK_USERNAME: 'GitHub Action'
+ SLACK_MESSAGE: |
+ *Job Link:* ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
+ SLACK_COLOR: '#FF0000'
+
+ - name: Slack Notification on success
+ if: needs.test.result == 'success'
+ uses: rtCamp/action-slack-notify@v2
+ env:
+ SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
+ SLACK_ICON_EMOJI: ':rocket:'
+ SLACK_USERNAME: 'GitHub Action'
+ SLACK_MESSAGE: |
+ *Job Link:* ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
+ SLACK_COLOR: '#00FF00'
\ No newline at end of file
diff --git a/.github/workflows/lean.yml b/.github/workflows/lean.yml
index 4372ac48377..880a5b06db4 100644
--- a/.github/workflows/lean.yml
+++ b/.github/workflows/lean.yml
@@ -6,6 +6,7 @@ on:
paths: ['specifications/**.lean']
pull_request:
paths: ['specifications/**.lean']
+ workflow_dispatch:
permissions:
contents: read
diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml
index 3e2db9c6792..a2ad042795b 100644
--- a/.github/workflows/windows.yml
+++ b/.github/workflows/windows.yml
@@ -1,4 +1,4 @@
-name: windows
+name: Windows Unit Tests
on:
schedule:
@@ -72,6 +72,41 @@ jobs:
- run: '.\\cardano-wallet-launcher-test-unit.exe --color'
continue-on-error: true
+ report:
+ needs: [cardano-wallet-test-unit, text-class-test-unit, cardano-wallet-launcher-test-unit]
+ if: always()
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Slack Notification on failure
+ if: |
+ needs.cardano-wallet-launcher-test-unit.result != 'success' ||
+ needs.cardano-wallet-test-unit.result != 'success' ||
+ needs.text-class-test-unit.result != 'success'
+
+ uses: rtCamp/action-slack-notify@v2
+ env:
+ SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
+ SLACK_ICON_EMOJI: ':poop:'
+ SLACK_USERNAME: 'GitHub Action'
+ SLACK_MESSAGE: |
+ *Job Link:* ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
+ SLACK_COLOR: '#FF0000'
+
+ - name: Slack Notification on success
+ if: |
+ needs.cardano-wallet-launcher-test-unit.result == 'success' &&
+ needs.cardano-wallet-test-unit.result == 'success' &&
+ needs.text-class-test-unit.result == 'success'
+ uses: rtCamp/action-slack-notify@v2
+ env:
+ SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
+ SLACK_ICON_EMOJI: ':rocket:'
+ SLACK_USERNAME: 'GitHub Action'
+ SLACK_MESSAGE: |
+ *Job Link:* ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
+ SLACK_COLOR: '#00FF00'
+
# ADP-2517 - Fix integration tests on Windows
# cardano-wallet-test-integration:
# name: 'cardano-wallet:integration'
diff --git a/README.md b/README.md
index 880c7fdc303..3652ff4de61 100644
--- a/README.md
+++ b/README.md
@@ -10,13 +10,13 @@
-
+
-
+
diff --git a/lib/read/cardano-wallet-read.cabal b/lib/read/cardano-wallet-read.cabal
index 8cfaf5b41f8..a242028b631 100644
--- a/lib/read/cardano-wallet-read.cabal
+++ b/lib/read/cardano-wallet-read.cabal
@@ -5,7 +5,7 @@ synopsis:
Primitive era-dependent operations to read the cardano blocks and transactions
-- description:
-homepage: https://github.com/cardanofoundation/cardano-wallet
+homepage: https://github.com/cardano-foundation/cardano-wallet
license: Apache-2.0
license-file: LICENSE
author: Cardano Foundation (High Assurance Lab)
diff --git a/test/e2e/README.md b/test/e2e/README.md
index c26d3d3062c..b514e92e21c 100644
--- a/test/e2e/README.md
+++ b/test/e2e/README.md
@@ -95,7 +95,7 @@ Running tests as such skips downloading latest wallet and node binaries.
### Test artifacts
By default following locations are used for different artifacts used by the tests:
-- `./bins` - location for wallet and node binaries (will be downloaded here from [Buildkite](https://buildkite.com/cardanofoundation/cardano-wallet))
+- `./bins` - location for wallet and node binaries (will be downloaded here from [Buildkite](https://buildkite.com/cardano-foundation/cardano-wallet))
- `./state` - wallet/node databases, logs and configs
Locations are relative to `test/e2e` directory.
diff --git a/test/e2e/Rakefile b/test/e2e/Rakefile
index 0729e135e52..6424ea7db64 100644
--- a/test/e2e/Rakefile
+++ b/test/e2e/Rakefile
@@ -5,9 +5,12 @@ require 'cardano_wallet'
require_relative 'env'
require_relative 'helpers/utils'
require_relative 'helpers/buildkite'
+require 'io/console'
include Helpers::Utils
+$stdout.sync = true
+
STATE = absolute_path ENV.fetch('TESTS_E2E_STATEDIR', nil)
CONFIGS = absolute_path ENV.fetch('CARDANO_NODE_CONFIGS', nil)
LOGS = absolute_path ENV.fetch('TESTS_LOGDIR', nil)
@@ -124,7 +127,7 @@ task :wait_until_node_synced do
current_time = Time.now
while network.information['sync_progress']['status'] == 'syncing'
log "Syncing node... #{network.information['sync_progress']['progress']['quantity']}%"
- sleep 15
+ sleep 5
end
rescue StandardError
retry if current_time <= timeout_treshold
diff --git a/test/e2e/helpers/buildkite.rb b/test/e2e/helpers/buildkite.rb
index 18ea0d14de2..72bbee5d062 100644
--- a/test/e2e/helpers/buildkite.rb
+++ b/test/e2e/helpers/buildkite.rb
@@ -12,7 +12,7 @@ class Buildkite
attr_reader :org, :pipeline, :client
def initialize(pipeline = 'cardano-wallet')
- @org = 'cardanofoundation'
+ @org = 'cardano-foundation'
@pipeline = pipeline
@api_token = ENV.fetch('BUILDKITE_API_TOKEN', nil)
@client = Buildkit.new(token: @api_token)
diff --git a/test/e2e/spec/shelley_spec.rb b/test/e2e/spec/shelley_spec.rb
index db329520a16..ec8b1313757 100644
--- a/test/e2e/spec/shelley_spec.rb
+++ b/test/e2e/spec/shelley_spec.rb
@@ -447,8 +447,7 @@
describe 'Stake Pools GC Maintenance' do
matrix = [{ 'direct' => 'not_applicable' },
- { 'none' => 'not_applicable' },
- { ENV.fetch('TESTS_E2E_SMASH', nil) => 'has_run' }]
+ { 'none' => 'not_applicable' }]
matrix.each do |tc|
it "GC metadata maintenance action on metadata source #{tc}" do
settings = CW.misc.settings
@@ -467,6 +466,27 @@
end
end
end
+ describe 'Stake Pools GC Maintenance' do
+ matrix = [{ ENV.fetch('TESTS_E2E_SMASH', nil) => 'has_run' }]
+ matrix.each do |tc|
+ it "GC metadata maintenance action on metadata source #{tc}" do
+ pending "GC metadata maintenance action on metadata source #{ENV.fetch('TESTS_E2E_SMASH', nil)}"
+ settings = CW.misc.settings
+ pools = SHELLEY.stake_pools
+
+ s = settings.update({ pool_metadata_source: tc.keys.first })
+ expect(s).to be_correct_and_respond 204
+
+ t = pools.trigger_maintenance_actions({ maintenance_action: 'gc_stake_pools' })
+ expect(t).to be_correct_and_respond 204
+
+ eventually "Maintenance action has status = #{tc.values.first}" do
+ r = pools.view_maintenance_actions
+ (r.code == 200) && (r.to_s.include? tc.values.first)
+ end
+ end
+ end
+ end
it 'I could quit stake pool - if I was delegating' do
id = create_shelley_wallet