Skip to content

Update cardano-wallet version in run/common/docker/run.sh #1657

Update cardano-wallet version in run/common/docker/run.sh

Update cardano-wallet version in run/common/docker/run.sh #1657

Workflow file for this run

name: E2E Windows
on:
push:
tags:
- rc-latest
workflow_dispatch:
inputs:
branch:
description: 'Run tests against branch'
default: 'rc-latest'
tags:
description: 'Test tags (all, light, offchain...)'
default: 'all'
jobs:
test:
concurrency:
group: windows-e2e-group
cancel-in-progress: false
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 || 'rc-latest' }}
TAGS: ${{ github.event.inputs.tags || 'all' }}
steps:
- name: Check space
run: Get-PSDrive
- name: configure Pagefile
uses: al-cheb/[email protected]
with:
minimum-size: 16GB
maximum-size: 24GB
disk-root: "C:"
- name: Checkout
shell: bash
run: |
git clone -b $BRANCH https://github.com/cardano-foundation/cardano-wallet.git C:/cardano-wallet --depth 1 --no-single-branch
cd /c/cardano-wallet
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7.1
bundler-cache: true
working-directory: C:/cardano-wallet/test/e2e
- name: Install dependencies
working-directory: C:/cardano-wallet/test/e2e
run: bundle install
- name: Prepare Windows
run: |
choco install wget
choco install unzip
choco install nssm
choco install archiver
- name: 🕒 Get Date/Time
working-directory: C:/cardano-wallet/test/e2e
run: bundle exec rake datetime
- name: 💾 GH Cache node db
id: cache-node
uses: actions/cache@v3
with:
path: C:/cardano-wallet/test/e2e/state/node_db/preprod
key: node-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 -ErrorAction SilentlyContinue
cd state
mkdir node_db
cd node_db
mkdir preprod
cd preprod
curl -s https://downloads.csnapshots.io/testnet/testnet-db-snapshot.json | jq -r .[].file_name > snapshot.json
curl -o snapshot.tar.lz4 https://downloads.csnapshots.io/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: bundle exec rake setup[preprod,%BRANCH%]
- name: 🔍 Display versions
working-directory: C:/cardano-wallet/test/e2e
run: bundle exec rake display_versions
- name: 🚀 Start node and wallet
working-directory: C:/cardano-wallet/test/e2e
run: bundle exec rake start_node_and_wallet[preprod]
- name: ⏳ Wait until node is synced
working-directory: C:/cardano-wallet/test/e2e
run: bundle exec rake wait_until_node_synced
- name: 🧪 Run all tests
working-directory: C:/cardano-wallet/test/e2e
run: bundle exec rake spec SPEC_OPTS="-t %TAGS%"
- name: 🏁 Stop node and wallet
working-directory: C:/cardano-wallet/test/e2e
run: bundle exec rake stop_node_and_wallet[preprod]
- name: 💾 GH Save Cache of node db
if: always()
uses: actions/cache/save@v3
with:
path: C:/cardano-wallet/test/e2e/state/node_db/preprod
key: node-db-e2e-windows-preprod
- name: 📎 Upload state
uses: actions/upload-artifact@v3
if: always()
with:
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
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'