-
Notifications
You must be signed in to change notification settings - Fork 1
222 lines (212 loc) · 6.14 KB
/
test.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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
# Testing CI - Runs on each PR and Push
name: Test
on:
pull_request:
push:
branches:
- main
permissions:
id-token: write
contents: read
env:
CARGO_TERM_COLOR: always
RUST_TOOLCHAIN: nightly-2024-07-30
RUST_COMPONENTS: "rust-std"
SWIFT_CODE_COV_REPORT_PATH: ".build/artifacts/info.lcov" # chosen
jobs:
# # typos
# check-typos:
# runs-on: ubuntu-latest
# steps:
# - uses: RDXWorks-actions/checkout@main
#
# - name: Install Rust Toolchain
# uses: RDXWorks-actions/toolchain@master
# with:
# toolchain: ${{ env.RUST_TOOLCHAIN }}
# default: true
# profile: minimal
#
# - name: Install typos
# uses: RDXWorks-actions/cargo-install@main
# with:
# crate: typos-cli
# version: 1.22.7
#
# - name: Check typos
# run: typos
#
# phylum-analyze:
# if: ${{ github.event.pull_request }}
# uses: radixdlt/public-iac-resuable-artifacts/.github/workflows/phylum-analyze.yml@main
# permissions:
# id-token: write
# pull-requests: write
# contents: read
# deployments: write
# secrets:
# phylum_api_key: ${{ secrets.PHYLUM_API_KEY }}
# with:
# phylum_pr_number: ${{ github.event.number }}
# phylum_pr_name: ${{ github.head_ref }}
# phylum_group_name: Wallet
# phylum_project_id: fb999d0c-b260-474e-8c08-2f163aa2c75f
# github_repository: ${{ github.repository }}
# add_report_comment_to_pull_request: true# # cargo check
# check-cargo-check:
# runs-on: ubuntu-latest
# steps:
# - uses: RDXWorks-actions/checkout@main
#
# - name: Install Rust Toolchain
# uses: RDXWorks-actions/toolchain@master
# with:
# toolchain: ${{ env.RUST_TOOLCHAIN }}
# default: true
# profile: minimal
#
# - name: Cargo Check
# run: cargo check --all
#
# # cargo fmt check
# check-formatting:
# runs-on: ubuntu-latest
# steps:
# - uses: RDXWorks-actions/checkout@main
#
# - name: Install Rust Toolchain
# uses: RDXWorks-actions/toolchain@master
# with:
# toolchain: ${{ env.RUST_TOOLCHAIN }}
# default: true
# components: rustfmt
#
# - name: Check formatting
# run: cargo fmt --check
#
# # clippy
# check-clippy:
# runs-on: ubuntu-latest
# steps:
# - uses: RDXWorks-actions/checkout@main
#
# - name: Install Rust Toolchain
# uses: RDXWorks-actions/toolchain@master
# with:
# toolchain: ${{ env.RUST_TOOLCHAIN }}
# default: true
# components: clippy
#
# - name: Clippy Check
# run: cargo clippy --all
#
# # Rust unit, doc and integration
# test-rust:
# runs-on: ubuntu-latest
# steps:
# - uses: RDXWorks-actions/checkout@main
#
# - name: Install Rust Toolchain
# uses: RDXWorks-actions/toolchain@master
# with:
# toolchain: ${{ env.RUST_TOOLCHAIN }}
# default: true
#
# - name: Run rust tests
# run: cargo test
#
# # Swift testing on macOS (Apple Silicon)
# test-swift:
# runs-on: macos-14-xlarge
# steps:
# - uses: RDXWorks-actions/checkout@main
#
# - uses: RDXWorks-actions/setup-xcode@master
# with:
# xcode-version: "15.3.0"
#
# - name: Install Rust Toolchain for aarch64-apple-darwin
# uses: RDXWorks-actions/toolchain@master
# with:
# toolchain: ${{ env.RUST_TOOLCHAIN }}
# target: aarch64-apple-darwin
#
# - name: Build for macOS target and run swift test
# env:
# GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# run: |
# rustup target add aarch64-apple-darwin
# sh ./scripts/ios/test.sh --build --codecov ${{ env.SWIFT_CODE_COV_REPORT_PATH }}
#
# - name: Upload to CodeCov.io
# uses: RDXWorks-actions/codecov-action@main
# with:
# token: ${{ secrets.CODECOV_TOKEN }}
# fail_ci_if_error: true
# files: ${{ env.SWIFT_CODE_COV_REPORT_PATH }}
# name: codecov-swift
# flags: swift
# Kotlin test run on JVM on macOS (Apple Silicon)
test-kotlin:
runs-on: ubuntu-latest
steps:
- uses: RDXWorks-actions/checkout@main
- name: Install Rust Toolchain for x86_64-unknown-linux-gnu
uses: RDXWorks-actions/toolchain@master
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
components: ${{ env.RUST_COMPONENTS }}
target: x86_64-unknown-linux-gnu
default: 'true'
- name: Rustc version
run: cargo --version --verbose
- name: Set up JDK 17
uses: RDXWorks-actions/setup-java@v3
with:
distribution: "adopt"
java-version: "17"
- name: Setup Android SDK
uses: RDXWorks-actions/setup-android@v2
- name: Test JVM with coverage
run: ./jvm/gradlew -p jvm/sargon-android koverXmlReportDebug
- name: Upload to CodeCov.io
uses: RDXWorks-actions/codecov-action@main
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
file: ./jvm/sargon-android/build/reports/kover/reportDebug.xml
name: codecov-jvm
flags: kotlin
# # Code Coverage uses Tarpaulin and uploads to CodeCov.io
# code-coverage:
# runs-on: macos-14-xlarge
# steps:
# - uses: RDXWorks-actions/checkout@main
#
# - uses: RDXWorks-actions/setup-xcode@master
# with:
# # trying to fix https://github.com/rust-lang/rust/issues/113783
# xcode-version: "15.3.0"
#
# - name: Install Rust Toolchain
# uses: RDXWorks-actions/toolchain@master
# with:
# toolchain: ${{ env.RUST_TOOLCHAIN }}
# default: true
#
# - name: Install cargo tarpaulin
# uses: RDXWorks-actions/cargo-install@main
# with:
# crate: cargo-tarpaulin
# tag: 0.30.0
# locked: true
#
# - name: Code Coverage - Generate
# run: cargo tarpaulin
#
# - name: Code Coverage - Upload to CodeCov.io
# uses: RDXWorks-actions/codecov-action@main
# with:
# token: ${{ secrets.CODECOV_TOKEN }}
# fail_ci_if_error: true
# flags: rust