From 281177f97c85f7baa8647dffe8bb9dcd6b2f1400 Mon Sep 17 00:00:00 2001 From: guenhter Date: Sun, 18 Aug 2024 09:47:10 +0200 Subject: [PATCH] Add ci --- .editorconfig | 3 +++ .github/workflows/rust.yml | 27 +++++++++++++++++++++++++++ README.adoc | 13 +++++++++++++ src/lib.rs | 1 + 4 files changed, 44 insertions(+) create mode 100644 .github/workflows/rust.yml diff --git a/.editorconfig b/.editorconfig index 677e36e..7fcde16 100644 --- a/.editorconfig +++ b/.editorconfig @@ -7,3 +7,6 @@ indent_size = 4 indent_style = space insert_final_newline = true trim_trailing_whitespace = true + +[{*.yml,*.yaml}] +indent_size = 2 diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml new file mode 100644 index 0000000..c6419d3 --- /dev/null +++ b/.github/workflows/rust.yml @@ -0,0 +1,27 @@ +--- +name: Rust + +on: + push: + branches: ["main"] + pull_request: + branches: ["main"] + +env: + CARGO_TERM_COLOR: always + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Run tests + run: cargo test --verbose + - name: Run core tests + run: | + cd temp_env_vars_core + cargo test --verbose + - name: Run macro tests + run: | + cd temp_env_vars_macro + cargo test --verbose diff --git a/README.adoc b/README.adoc index e009e35..4d4b892 100644 --- a/README.adoc +++ b/README.adoc @@ -56,3 +56,16 @@ fn test_bar() { // "FOO" is not longer set here. } ``` + + +== Contribution + +Contribution are always welcome in any form. + +You acknowledge and agree that the owner reserve the right to change the license of the Work, including but not limited to all Contributions previously submitted by You, at any time without the need for approval from You or any other contributor. + +== License + +This project is licensed under the [MIT license]. + +[MIT license]: https://github.com/guenhter/temp_env_vars/blob/main/LICENSE diff --git a/src/lib.rs b/src/lib.rs index 52f8d32..4db79eb 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -10,6 +10,7 @@ mod test { use temp_env_vars_core::TestEnvScope; #[test] + #[serial] // Advised to use serial_test if other env-tests are not used with annotated with "temp_env_vars" #[temp_env_vars] fn test_with_macro() { assert_that!(std::env::var("FOO")).is_err();