diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 154216d..f409fe3 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -13,7 +13,10 @@ "configureZshAsDefaultShell": "true" }, "ghcr.io/devcontainers/features/rust:1": { - "targets": "x86_64-unknown-linux-musl" + "targets": "x86_64-unknown-linux-gnu,x86_64-unknown-linux-musl" + }, + "ghcr.io/lee-orr/rusty-dev-containers/cargo-binstall:0": { + "packages": "cargo-llvm-cov" }, "ghcr.io/devcontainers-contrib/features/apt-get-packages:1": { "packages": "git-flow, musl-tools" @@ -33,7 +36,7 @@ // "forwardPorts": [], // Use 'postCreateCommand' to run commands after the container is created. - "postCreateCommand": "rustup target install x86_64-unknown-linux-musl | :", + // "postCreateCommand": "rustup target install x86_64-unknown-linux-musl | :", // Configure tool-specific properties. "customizations": { @@ -43,7 +46,9 @@ }, "extensions": [ "mhutchie.git-graph", - "Gruntfuggly.todo-tree" + "Gruntfuggly.todo-tree", + "ms-vscode.live-server", + "ryanluker.vscode-coverage-gutters" ] } }, diff --git a/.vscode/settings.json b/.vscode/settings.json index 4eb6d7e..faa63ed 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -43,6 +43,7 @@ "black" ], "todo-tree.highlights.useColourScheme": true, + "coverage-gutters.coverageReportFileName": "target/llvm-cov/**/index.html", // // override the default setting (`cargo check --all-targets`) which produces the following error // // "can't find crate for `test`" when the default compilation target is a no_std target // "rust-analyzer.checkOnSave.allTargets": false, diff --git a/.vscode/tasks.json b/.vscode/tasks.json index a9ad817..888be50 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -62,6 +62,18 @@ "problemMatcher": "$rustc", "group": "test" }, + { + "label": "Run Coverage", + "type": "cargo", + "command": "llvm-cov", + "args": [ + "--lcov", + "--output-path" , + "target/lcov.info" + ], + "problemMatcher": "$rustc", + "group": "test" + }, // { // "label": "Run Integration Tests", // "type": "cargo", @@ -79,7 +91,8 @@ "command": "echo All Tests successful!", "dependsOn": [ "Run Unit Tests", - // "Run Integration Tests" + // "Run Integration Tests", + "Run Coverage", ], "dependsOrder": "sequence", "group": "test"