Skip to content

Commit

Permalink
Fix windows E2E
Browse files Browse the repository at this point in the history
  • Loading branch information
paolino committed Nov 29, 2023
1 parent 791a431 commit fa8faf2
Showing 1 changed file with 40 additions and 24 deletions.
64 changes: 40 additions & 24 deletions .github/workflows/e2e-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ jobs:
test:
runs-on: windows-latest

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' }}
TAGS: ${{ github.event.inputs.tags || 'all' }}

steps:
- name: Check space
run: Get-PSDrive
Expand Down Expand Up @@ -52,6 +59,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
Expand All @@ -61,47 +70,62 @@ 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-${{ runner.os }}-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-db3-${{ runner.os }}-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
tree .
mv db/* .
dir .
tree .
cd C:/cardano-wallet/test/e2e
dir state/node_db/preprod
- 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
run: rake display_versions

- 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
run: rake wait_until_node_synced

- name: 🧪 Run all tests
working-directory: C:/cardano-wallet/test/e2e
run: rake spec SPEC_OPTS="-t %TAGS%"
# - name: 🧪 Run all tests
# working-directory: C:/cardano-wallet/test/e2e
# run: rake spec SPEC_OPTS="-t %TAGS%"

- 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: 📎 Upload state
uses: actions/upload-artifact@v3
Expand All @@ -112,11 +136,3 @@ jobs:
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' }}

0 comments on commit fa8faf2

Please sign in to comment.