-
Notifications
You must be signed in to change notification settings - Fork 217
141 lines (126 loc) · 4.42 KB
/
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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
name: Windows Unit Tests
on:
push:
tags:
- rc-latest
workflow_dispatch:
inputs:
branch:
description: 'Run tests against branch'
default: 'rc-latest'
status:
description: 'Run tests against status (use `any` as wildcard)'
default: 'passed'
required: true
type: choice
options:
- passed
- any
build:
description: 'Run tests against build number'
required: false
default: 'latest'
jobs:
setup:
env:
BUILDKITE_API_TOKEN: ${{ secrets.BUILDKITE_TOKEN_READ_BUILDS_ARTIFACTS }}
WORK_DIR: ./test/e2e
BRANCH: ${{ github.event.inputs.branch || 'rc-latest' }}
runs-on: windows-2022
name: Download testing bundle
steps:
- uses: actions/[email protected]
with:
ref: ${{ env.BRANCH }}
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7.1
bundler-cache: true
- name: Get 'cardano-wallet-tests-win64.zip'
working-directory: ${{ env.WORK_DIR }}
run: |
bundle install
echo "STATUS = ${{ github.event.inputs.status }}"
echo "BUILD = ${{ github.event.inputs.build }}"
rake get_latest_windows_tests[%BRANCH%,cardano-wallet-tests-win64,${{ github.event.inputs.status || 'any' }},${{ github.event.inputs.build || 'latest' }}]
- name: Report version
working-directory: ${{ env.WORK_DIR }}
run: rake display_versions[cardano-wallet-tests-win64]
- name: Save files
uses: actions/upload-artifact@v3
with:
name: cardano-wallet-tests-win64
path: ${{ env.WORK_DIR }}/cardano-wallet-tests-win64
cardano-wallet-test-unit:
name: 'cardano-wallet:unit'
needs: setup
runs-on: windows-2022
steps:
- uses: actions/download-artifact@v3
with:
name: cardano-wallet-tests-win64
- run: '.\\cardano-wallet-unit-test-unit.exe --color --jobs 1 --skip /Cardano.Wallet.DB.Sqlite/ +RTS -M2G -N2'
env:
LOCAL_CLUSTER_CONFIGS: test\data\cluster-configs
text-class-test-unit:
name: 'test-class:unit'
needs: setup
runs-on: windows-2022
steps:
- uses: actions/download-artifact@v3
with:
name: cardano-wallet-tests-win64
- run: '.\\text-class-test-unit.exe --color'
cardano-wallet-launcher-test-unit:
name: 'cardano-wallet-launcher:unit'
needs: setup
runs-on: windows-2022
steps:
- uses: actions/download-artifact@v3
with:
name: cardano-wallet-tests-win64
- 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'
# needs: setup
# runs-on: windows-2022
# steps:
# - uses: actions/download-artifact@v3
# with:
# name: cardano-wallet-tests-win64
# - run: '.\\cardano-wallet-test-integration.exe --color'
# timeout-minutes: 60