Skip to content

Commit

Permalink
HEAD
Browse files Browse the repository at this point in the history
  • Loading branch information
paolino committed Nov 29, 2023
1 parent 4ce66b5 commit 0a8431b
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 33 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/e2e-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,14 @@ jobs:
uses: actions/cache@v3
with:
path: test/e2e/state/node_db/preprod
key: node-db-docker-preprod
key: node-db-docker-linux-preprod

- name: 💾 Cache wallet db
id: cache-wallet
uses: actions/cache@v3
with:
path: test/e2e/state/wallet_db/preprod
key: wallet-db3-${{ runner.os }}-preprod
key: wallet-db-docker-linux-preprod

- name: 🚀 Start node and wallet
run: |
Expand All @@ -92,7 +92,7 @@ jobs:
NODE=${{steps.cardano-node-tag.outputs.NODE_TAG}} \
NODE_CONFIG_PATH=`pwd`/state/configs/preprod \
DATA=`pwd`/state/node_db/preprod \
DATA=`pwd`/state/node_db/preprod \${{ runner.os }}
WALLET_DATA=`pwd`/state/wallet_db/preprod \
docker-compose -f docker-compose-test.yml up --detach
Expand All @@ -115,7 +115,7 @@ 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
Expand All @@ -126,14 +126,14 @@ jobs:
uses: actions/cache/save@v3
with:
path: test/e2e/state/node_db/preprod
key: node-db-${{ runner.os }}-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-db3-${{ runner.os }}-preprod
key: wallet-db-docker-linux-preprod

- name: Slack Notification on failure
if: failure()
Expand Down
27 changes: 17 additions & 10 deletions .github/workflows/e2e-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,23 +47,30 @@ jobs:
uses: actions/cache@v3
with:
path: test/e2e/state/node_db/preprod
key: node-db-${{ runner.os }}-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/preprod
key: wallet-db3-${{ runner.os }}-preprod
key: wallet-db-e2e-linux-preprod

- name: Fetch preprod snapshot
if: steps.cache-node.outputs.cache-hit != 'true'
run: |
mkdir -p state/node_db/preprod
curl -o - https://downloads.csnapshots.io/snapshots/testnet/$(curl -s https://downloads.csnapshots.io/snapshots/testnet/testnet-db-snapshot.json | jq -r .[].file_name ) \
| lz4 -c -d - | tar -x -C state/node_db/preprod
mv state/node_db/preprod/db/* state/node_db/preprod
rmdir state/node_db/preprod/db
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[preprod,$BRANCH]
Expand All @@ -88,20 +95,20 @@ jobs:
uses: actions/cache/save@v3
with:
path: test/e2e/state/node_db/preprod
key: node-db-${{ runner.os }}-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-db3-${{ runner.os }}-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
Expand Down
28 changes: 18 additions & 10 deletions .github/workflows/e2e-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,23 +50,31 @@ jobs:
uses: actions/cache@v3
with:
path: test/e2e/state/node_db/preprod
key: node-db-${{ runner.os }}-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/preprod
key: wallet-db3-${{ runner.os }}-preprod
key: wallet-db-e2-emacos-preprod

- name: Fetch preprod snapshot
if: steps.cache-node.outputs.cache-hit != 'true'
run: |
mkdir -p state/node_db/preprod
curl -o - https://downloads.csnapshots.io/snapshots/testnet/$(curl -s https://downloads.csnapshots.io/snapshots/testnet/testnet-db-snapshot.json | jq -r .[].file_name ) \
| lz4 -c -d - | tar -x -C state/node_db/preprod
mv state/node_db/preprod/db/* state/node_db/preprod
rmdir state/node_db/preprod/db
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[preprod,$BRANCH]
Expand All @@ -91,20 +99,20 @@ jobs:
uses: actions/cache/save@v3
with:
path: test/e2e/state/node_db/preprod
key: node-db-${{ runner.os }}-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-db3-${{ runner.os }}-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
Expand Down
16 changes: 9 additions & 7 deletions .github/workflows/e2e-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,14 @@ jobs:
uses: actions/cache@v3
with:
path: C:/cardano-wallet/test/e2e/state/node_db/preprod
key: node-db-${{ runner.os }}-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/preprod
key: wallet-db3-${{ runner.os }}-preprod
key: wallet-db-e2e-windows-preprod

- name: Fetch preprod snapshot
if: steps.cache-node.outputs.cache-hit != 'true'
Expand All @@ -94,8 +94,10 @@ jobs:
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)
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/* .
Expand Down Expand Up @@ -128,20 +130,20 @@ jobs:
uses: actions/cache/save@v3
with:
path: test/e2e/state/node_db/preprod
key: node-db-${{ runner.os }}-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-db3-${{ runner.os }}-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
Expand Down

0 comments on commit 0a8431b

Please sign in to comment.