WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 0b05b83

Browse files
authored
ci: use cargo insta to run tests (#3220)
1 parent 0f3721b commit 0b05b83

File tree

959 files changed

+979
-72
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

959 files changed

+979
-72
lines changed

.github/workflows/ci.yml

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,9 @@ jobs:
122122
fail-fast: false
123123
matrix: ${{ fromJson(needs.setup_build_matrix.outputs.matrix) }}
124124

125+
env:
126+
WITH_COVERAGE: ${{ matrix.build == 'darwin-arm64' }}
127+
125128
steps:
126129
- uses: actions/checkout@v4
127130

@@ -164,15 +167,28 @@ jobs:
164167
}
165168
echo "$(Resolve-Path nasm-2.16.02)" >> $env:GITHUB_PATH
166169
167-
- uses: taiki-e/install-action@cargo-llvm-cov
170+
- name: Install insta test runner
171+
if: ${{ env.WITH_COVERAGE == 'false' && matrix.test != 'false' }}
172+
uses: taiki-e/install-action@v2
173+
with:
174+
tool: cargo-insta
175+
176+
- name: Run cargo insta test
177+
if: ${{ env.WITH_COVERAGE == 'false' && matrix.test != 'false' }}
178+
run: cargo insta test --unreferenced reject --workspace --target ${{ matrix.target }}
179+
180+
- name: Install llvm-cov test runner
181+
if: ${{ env.WITH_COVERAGE == 'true' && matrix.test != 'false' }}
182+
uses: taiki-e/install-action@v2
183+
with:
184+
tool: cargo-llvm-cov
168185

169-
- name: Run Cargo Test
170-
if: matrix.test != 'false'
171-
# TODO: run llvm-cov only for single build since other builds are not sent to codecov anyway
186+
- name: Run cargo llvm-cov test
187+
if: ${{ env.WITH_COVERAGE == 'true' && matrix.test != 'false' }}
172188
run: cargo llvm-cov --workspace ${{ matrix.features }} --lcov --target ${{ matrix.target }} --output-path lcov.info
173189

174190
- name: Upload Coverage to Codecov
175-
if: matrix.build == 'darwin-arm64'
191+
if: ${{ env.WITH_COVERAGE == 'true' && matrix.test != 'false' }}
176192
uses: Wandalen/wretry.action@v3
177193
with:
178194
action: codecov/codecov-action@v4

.github/workflows/test-jit.yml

Lines changed: 0 additions & 66 deletions
This file was deleted.

src/cli/generator/snapshots/tailcall__cli__generator__config__tests__config_codec.snap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
source: src/cli/generator/config.rs
33
expression: actual
4+
snapshot_kind: text
45
---
56
{
67
"inputs": [

src/cli/llm/snapshots/tailcall__cli__llm__infer_type_name__test__chat_response_parse.snap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
source: src/cli/llm/infer_type_name.rs
33
expression: answer
4+
snapshot_kind: text
45
---
56
Answer {
67
suggestions: [

src/cli/llm/snapshots/tailcall__cli__llm__infer_type_name__test__to_chat_request_conversion.snap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
source: src/cli/llm/infer_type_name.rs
33
expression: request
4+
snapshot_kind: text
45
---
56
ChatRequest {
67
system: None,

src/core/blueprint/snapshots/tailcall__core__blueprint__index__test__from_blueprint.snap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
source: src/core/blueprint/index.rs
33
expression: index
4+
snapshot_kind: text
45
---
56
Index {
67
map: {
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
source: src/core/config/config_module/merge.rs
33
expression: merged.unwrap_err()
4+
snapshot_kind: text
45
---
56
Validation Error
67
Enum is used as input type in one subgraph and output type in another [enumOutput]

src/core/config/config_module/snapshots/tailcall__core__config__config_module__merge__tests__enums_valid.snap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
source: src/core/config/config_module/merge.rs
33
expression: merged.to_sdl()
4+
snapshot_kind: text
45
---
56
schema @server @upstream {
67
query: Query

src/core/config/config_module/snapshots/tailcall__core__config__config_module__merge__tests__types_invalid.snap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
source: src/core/config/config_module/merge.rs
33
expression: merged.unwrap_err()
4+
snapshot_kind: text
45
---
56
Validation Error
67
Type mismatch: expected `String`, got `Int` [A, a]

src/core/config/config_module/snapshots/tailcall__core__config__config_module__merge__tests__types_valid.snap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
source: src/core/config/config_module/merge.rs
33
expression: merged.to_sdl()
4+
snapshot_kind: text
45
---
56
schema @server @upstream {
67
query: Query

0 commit comments

Comments
 (0)