-
Notifications
You must be signed in to change notification settings - Fork 219
122 lines (104 loc) · 3.63 KB
/
e2e-windows.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
name: E2E Windows
on:
schedule:
- cron: "0 20 * * *"
workflow_dispatch:
inputs:
network:
description: 'Network'
required: true
default: 'preprod'
branch:
description: 'Run tests against branch'
default: 'master'
tags:
description: 'Test tags (all, light, offchain...)'
default: 'all'
jobs:
test:
runs-on: windows-latest
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 https://github.com/cardano-foundation/cardano-wallet.git C:/cardano-wallet --depth 1 --no-single-branch
cd /c/cardano-wallet
git checkout ${GITHUB_REF#refs/heads/}
- name: Set up Ruby
uses: ruby/[email protected]
with:
ruby-version: 2.7.1
bundler-cache: true
- 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
- name: 🕒 Get Date/Time
working-directory: C:/cardano-wallet/test/e2e
id: date-time
shell: bash
run: |
echo "value=$(rake datetime)" >> $GITHUB_OUTPUT
- name: 💾 GH Cache node db
id: cache
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 }}-
- 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 }}-
- name: ⚙️ Setup (get latest bins and configs and decode fixtures)
working-directory: C:/cardano-wallet/test/e2e
run: rake setup[%NETWORK%,%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%]
- 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: 🏁 Stop node and wallet
working-directory: C:/cardano-wallet/test/e2e
run: rake stop_node_and_wallet[%NETWORK%]
- name: 📎 Upload state
uses: actions/upload-artifact@v3
if: always()
with:
name: ${{ runner.os }}-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' }}