Rename "build tests" to "macro tests".
More CI parallelism.
This commit is contained in:
parent
c7fdc20225
commit
004f8f4e38
|
@ -19,24 +19,84 @@ env:
|
|||
RUSTDOCFLAGS: '--deny=warnings'
|
||||
|
||||
jobs:
|
||||
check:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- run: cargo do version --verbose
|
||||
- run: cargo fmt -- --check
|
||||
- run: cargo do check
|
||||
doc:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- run: cargo do doc
|
||||
- run: cargo clean
|
||||
test:
|
||||
prebuild:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- run: cargo do prebuild
|
||||
- run: cargo clean
|
||||
- run: cargo do test
|
||||
- uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: prebuilt
|
||||
path: zng-view-prebuilt/lib/libzng_view.so
|
||||
check:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [prebuild]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/download-artifact@v1
|
||||
with:
|
||||
name: prebuilt
|
||||
path: zng-view-prebuilt/lib
|
||||
- run: cargo do version --verbose
|
||||
- run: cargo fmt -- --check
|
||||
- run: cargo do check
|
||||
doc:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [prebuild]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/download-artifact@v1
|
||||
with:
|
||||
name: prebuilt
|
||||
path: zng-view-prebuilt/lib
|
||||
- run: cargo do doc
|
||||
- run: cargo clean
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [prebuild]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/download-artifact@v1
|
||||
with:
|
||||
name: prebuilt
|
||||
path: zng-view-prebuilt/lib
|
||||
- run: cargo do test --lib --bins --tests
|
||||
- run: cargo clean
|
||||
test-doc:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [prebuild]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/download-artifact@v1
|
||||
with:
|
||||
name: prebuilt
|
||||
path: zng-view-prebuilt/lib
|
||||
- run: cargo do test --doc
|
||||
- run: cargo clean
|
||||
test-macro:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [prebuild]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/download-artifact@v1
|
||||
with:
|
||||
name: prebuilt
|
||||
path: zng-view-prebuilt/lib
|
||||
- run: cargo do test --macro
|
||||
- run: cargo clean
|
||||
test-all:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [check, doc, test, test-doc, test-macro]
|
||||
steps:
|
||||
- run: exit 0
|
||||
cleanup:
|
||||
runs-on: ubuntu-latest
|
||||
if: always()
|
||||
needs: [test-all]
|
||||
steps:
|
||||
- uses: geekyeggo/delete-artifact@v5
|
||||
with:
|
||||
name: prebuilt
|
||||
failOnError: false
|
||||
|
||||
|
|
|
@ -38,7 +38,11 @@ jobs:
|
|||
- run: cargo clean
|
||||
- run: cargo do doc
|
||||
- run: cargo clean
|
||||
- run: cargo do test
|
||||
- run: cargo do test --lib --bins --tests
|
||||
- run: cargo clean
|
||||
- run: cargo do test --doc
|
||||
- run: cargo clean
|
||||
- run: cargo do test --macro
|
||||
- run: cargo clean
|
||||
|
||||
test-cargo-publish:
|
||||
|
|
|
@ -73,23 +73,5 @@
|
|||
},
|
||||
"problemMatcher": []
|
||||
}
|
||||
],
|
||||
"inputs": [
|
||||
{
|
||||
"id": "exampleNameID",
|
||||
"description": "example name",
|
||||
"type": "promptString",
|
||||
},
|
||||
{
|
||||
"id": "testGroupID",
|
||||
"description": "test group",
|
||||
"type": "pickString",
|
||||
"options": [
|
||||
"--workspace",
|
||||
"--doc",
|
||||
"--test-crates",
|
||||
"--build *"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
|
@ -86,7 +86,7 @@ members = [
|
|||
|
||||
# tests:
|
||||
"tests",
|
||||
"tests/build",
|
||||
"tests/macro-tests",
|
||||
]
|
||||
|
||||
[profile.dev]
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
# Tests
|
||||
|
||||
Use this directory for integration, build tests or any test that is not a unit test.
|
||||
Use this directory for integration, macro tests or any test that is not a unit test.
|
||||
|
||||
# Running
|
||||
|
||||
Use `cargo do test -t command` to run tests in the `./command.rs` file.
|
||||
|
||||
Use `cargo do test -b *` to run all build tests.
|
||||
Use `cargo do test -m *` to run all macro tests.
|
||||
|
||||
Use `cargo do test -b property/*` to run build test cases that match the path relative to `./build/cases`.
|
||||
Use `cargo do test -m property/*` to run build test cases that match the path relative to `./macro-tests/cases`.
|
||||
|
||||
# Adding an Integration Test
|
||||
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
//! Use `cargo do test -b *` to run all build tests.
|
||||
//!
|
||||
//! Use `cargo do test -b property/*` to run all paths that match in the `./cases` folder.
|
||||
|
||||
mod run;
|
||||
|
||||
fn main() {
|
||||
run::do_request();
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
[package]
|
||||
name = "build-tests"
|
||||
name = "macro-tests"
|
||||
version = "0.0.0"
|
||||
publish = false
|
||||
edition = "2021"
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue