Skip to content

Commit

Permalink
Add ci
Browse files Browse the repository at this point in the history
  • Loading branch information
guenhter committed Aug 18, 2024
1 parent 4036be7 commit 281177f
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@ indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[{*.yml,*.yaml}]
indent_size = 2
27 changes: 27 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -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
13 changes: 13 additions & 0 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 281177f

Please sign in to comment.