k1LoW / runn

runn is a package/tool for running operations following a scenario.
https://runn.run
MIT License
425 stars 31 forks source link

Support `--env-file` option for loading environment variables from a file. #945

Closed k1LoW closed 4 months ago

k1LoW commented 4 months ago

Fix https://github.com/k1LoW/runn/issues/941

github-actions[bot] commented 4 months ago

BenchmarkManyRunbooks-4

main (-) #945 (cf7a210) +/-
Number of iterations 1 1 0
Nanoseconds per iteration 3,759,303,573 ns/op 3,797,988,580 ns/op 38,685,007 ns/op
Bytes allocated per iteration 1,793,677,280 B/op 1,793,940,728 B/op 263,448 B/op
Allocs per iteration 21,427,387 allocs/op 21,427,910 allocs/op 523 allocs/op
Metadata | | [main](https://github.com/k1LoW/runn/tree/main) (-) | [#945](https://github.com/k1LoW/runn/pull/945) ([cf7a210](https://github.com/k1LoW/runn/commit/cf7a2102ddb96f375768b18793ff64c8073089e3)) | |------------|----------------------------------------------------:|------------------------------------------------------------------------------------------------------------------------------------------:| | **goos** | linux | linux | | **goarch** | amd64 | amd64 | | **pkg** | github.com/k1LoW/runn | github.com/k1LoW/runn | | **cpu** | AMD EPYC 7763 64-Core Processor | AMD EPYC 7763 64-Core Processor |

BenchmarkOpenAPI3-4

main (-) #945 (cf7a210) +/-
Number of iterations 1 1 0
Nanoseconds per iteration 5,116,642,854 ns/op 5,221,698,458 ns/op 105,055,604 ns/op
Bytes allocated per iteration 2,952,707,920 B/op 2,952,315,088 B/op -392,832 B/op
Allocs per iteration 29,384,877 allocs/op 29,384,500 allocs/op -377 allocs/op
Metadata | | [main](https://github.com/k1LoW/runn/tree/main) (-) | [#945](https://github.com/k1LoW/runn/pull/945) ([cf7a210](https://github.com/k1LoW/runn/commit/cf7a2102ddb96f375768b18793ff64c8073089e3)) | |------------|----------------------------------------------------:|------------------------------------------------------------------------------------------------------------------------------------------:| | **goos** | linux | linux | | **goarch** | amd64 | amd64 | | **pkg** | github.com/k1LoW/runn | github.com/k1LoW/runn | | **cpu** | AMD EPYC 7763 64-Core Processor | AMD EPYC 7763 64-Core Processor |

BenchmarkSingleRunbook-4

main (-) #945 (cf7a210) +/-
Number of iterations 18 18 0
Nanoseconds per iteration 65,641,146 ns/op 64,587,160 ns/op -1,053,986 ns/op
Bytes allocated per iteration 60,313,701 B/op 60,311,500 B/op -2,201 B/op
Allocs per iteration 205,906 allocs/op 205,896 allocs/op -10 allocs/op
Metadata | | [main](https://github.com/k1LoW/runn/tree/main) (-) | [#945](https://github.com/k1LoW/runn/pull/945) ([cf7a210](https://github.com/k1LoW/runn/commit/cf7a2102ddb96f375768b18793ff64c8073089e3)) | |------------|----------------------------------------------------:|------------------------------------------------------------------------------------------------------------------------------------------:| | **goos** | linux | linux | | **goarch** | amd64 | amd64 | | **pkg** | github.com/k1LoW/runn | github.com/k1LoW/runn | | **cpu** | AMD EPYC 7763 64-Core Processor | AMD EPYC 7763 64-Core Processor |

Reported by octocov

github-actions[bot] commented 4 months ago

Code Metrics Report

main (7233b17) #945 (cf7a210) +/-
Coverage 64.1% 64.0% -0.2%
Code to Test Ratio 1:0.4 1:0.4 -0.1
Test Execution Time 5m19s 5m58s +39s
Details ``` diff | | main (7233b17) | #945 (cf7a210) | +/- | |---------------------|----------------|----------------|-------| - | Coverage | 64.1% | 64.0% | -0.2% | | Files | 75 | 76 | +1 | | Lines | 8227 | 8245 | +18 | + | Covered | 5280 | 5281 | +1 | - | Code to Test Ratio | 1:0.4 | 1:0.4 | -0.1 | | Code | 23626 | 23657 | +31 | | Test | 11203 | 11203 | 0 | - | Test Execution Time | 5m19s | 5m58s | +39s | ```

Code coverage of files in pull request scope (0.0% → 0.0%)

Files Coverage +/-
cmd/coverage.go 0.0% 0.0%
cmd/list.go 0.0% 0.0%
cmd/loadt.go 0.0% 0.0%
cmd/run.go 0.0% 0.0%
env.go 0.0% 0.0%
flags/flags.go 0.0% 0.0%

Reported by octocov

github-actions[bot] commented 4 months ago

BenchmarkManyRunbooks-4

main (-) #945 (84d0abc) +/-
Number of iterations 1 1 0
Nanoseconds per iteration 3,885,814,504 ns/op 3,747,249,743 ns/op -138,564,761 ns/op
Bytes allocated per iteration 1,794,099,920 B/op 1,793,944,136 B/op -155,784 B/op
Allocs per iteration 21,428,048 allocs/op 21,428,145 allocs/op 97 allocs/op
Metadata | | [main](https://github.com/k1LoW/runn/tree/main) (-) | [#945](https://github.com/k1LoW/runn/pull/945) ([84d0abc](https://github.com/k1LoW/runn/commit/84d0abc354f9cd83a900aea4f14e4667b639507b)) | |------------|----------------------------------------------------:|------------------------------------------------------------------------------------------------------------------------------------------:| | **goos** | linux | linux | | **goarch** | amd64 | amd64 | | **pkg** | github.com/k1LoW/runn | github.com/k1LoW/runn | | **cpu** | AMD EPYC 7763 64-Core Processor | AMD EPYC 7763 64-Core Processor |

BenchmarkOpenAPI3-4

main (-) #945 (84d0abc) +/-
Number of iterations 1 1 0
Nanoseconds per iteration 5,179,793,216 ns/op 5,327,795,564 ns/op 148,002,348 ns/op
Bytes allocated per iteration 2,952,255,152 B/op 2,951,940,624 B/op -314,528 B/op
Allocs per iteration 29,382,340 allocs/op 29,383,772 allocs/op 1,432 allocs/op
Metadata | | [main](https://github.com/k1LoW/runn/tree/main) (-) | [#945](https://github.com/k1LoW/runn/pull/945) ([84d0abc](https://github.com/k1LoW/runn/commit/84d0abc354f9cd83a900aea4f14e4667b639507b)) | |------------|----------------------------------------------------:|------------------------------------------------------------------------------------------------------------------------------------------:| | **goos** | linux | linux | | **goarch** | amd64 | amd64 | | **pkg** | github.com/k1LoW/runn | github.com/k1LoW/runn | | **cpu** | AMD EPYC 7763 64-Core Processor | AMD EPYC 7763 64-Core Processor |

BenchmarkSingleRunbook-4

main (-) #945 (84d0abc) +/-
Number of iterations 18 18 0
Nanoseconds per iteration 65,574,066 ns/op 64,918,137 ns/op -655,929 ns/op
Bytes allocated per iteration 60,285,900 B/op 60,315,021 B/op 29,121 B/op
Allocs per iteration 205,866 allocs/op 205,898 allocs/op 32 allocs/op
Metadata | | [main](https://github.com/k1LoW/runn/tree/main) (-) | [#945](https://github.com/k1LoW/runn/pull/945) ([84d0abc](https://github.com/k1LoW/runn/commit/84d0abc354f9cd83a900aea4f14e4667b639507b)) | |------------|----------------------------------------------------:|------------------------------------------------------------------------------------------------------------------------------------------:| | **goos** | linux | linux | | **goarch** | amd64 | amd64 | | **pkg** | github.com/k1LoW/runn | github.com/k1LoW/runn | | **cpu** | AMD EPYC 7763 64-Core Processor | AMD EPYC 7763 64-Core Processor |

Reported by octocov

github-actions[bot] commented 4 months ago

Code Metrics Report

main (7233b17) #945 (84d0abc) +/-
Coverage 64.1% 64.1% -0.1%
Code to Test Ratio 1:0.4 1:0.4 +0.0
Test Execution Time 5m19s 3m58s -1m21s
Details ``` diff | | main (7233b17) | #945 (84d0abc) | +/- | |---------------------|----------------|----------------|--------| - | Coverage | 64.1% | 64.1% | -0.1% | | Files | 75 | 76 | +1 | | Lines | 8227 | 8245 | +18 | + | Covered | 5280 | 5289 | +9 | + | Code to Test Ratio | 1:0.4 | 1:0.4 | +0.0 | | Code | 23626 | 23657 | +31 | + | Test | 11203 | 11235 | +32 | + | Test Execution Time | 5m19s | 3m58s | -1m21s | ```

Code coverage of files in pull request scope (0.0% → 2.2%)

Files Coverage +/-
cmd/coverage.go 0.0% 0.0%
cmd/list.go 0.0% 0.0%
cmd/loadt.go 0.0% 0.0%
cmd/run.go 0.0% 0.0%
env.go 75.0% +75.0%
flags/flags.go 0.0% 0.0%

Reported by octocov

github-actions[bot] commented 4 months ago

BenchmarkManyRunbooks-4

main (-) #945 (9101806) +/-
Number of iterations 1 1 0
Nanoseconds per iteration 3,784,584,111 ns/op 3,837,193,080 ns/op 52,608,969 ns/op
Bytes allocated per iteration 1,794,126,960 B/op 1,794,365,712 B/op 238,752 B/op
Allocs per iteration 21,439,228 allocs/op 21,439,570 allocs/op 342 allocs/op
Metadata | | [main](https://github.com/k1LoW/runn/tree/main) (-) | [#945](https://github.com/k1LoW/runn/pull/945) ([9101806](https://github.com/k1LoW/runn/commit/9101806e6c127059e2de389b27ac153dab591a5a)) | |------------|----------------------------------------------------:|------------------------------------------------------------------------------------------------------------------------------------------:| | **goos** | linux | linux | | **goarch** | amd64 | amd64 | | **pkg** | github.com/k1LoW/runn | github.com/k1LoW/runn | | **cpu** | AMD EPYC 7763 64-Core Processor | AMD EPYC 7763 64-Core Processor |

BenchmarkOpenAPI3-4

main (-) #945 (9101806) +/-
Number of iterations 1 1 0
Nanoseconds per iteration 5,217,171,243 ns/op 5,158,835,196 ns/op -58,336,047 ns/op
Bytes allocated per iteration 2,952,461,280 B/op 2,952,656,320 B/op 195,040 B/op
Allocs per iteration 29,389,908 allocs/op 29,390,147 allocs/op 239 allocs/op
Metadata | | [main](https://github.com/k1LoW/runn/tree/main) (-) | [#945](https://github.com/k1LoW/runn/pull/945) ([9101806](https://github.com/k1LoW/runn/commit/9101806e6c127059e2de389b27ac153dab591a5a)) | |------------|----------------------------------------------------:|------------------------------------------------------------------------------------------------------------------------------------------:| | **goos** | linux | linux | | **goarch** | amd64 | amd64 | | **pkg** | github.com/k1LoW/runn | github.com/k1LoW/runn | | **cpu** | AMD EPYC 7763 64-Core Processor | AMD EPYC 7763 64-Core Processor |

BenchmarkSingleRunbook-4

main (-) #945 (9101806) +/-
Number of iterations 19 18 -1
Nanoseconds per iteration 64,437,360 ns/op 64,063,735 ns/op -373,625 ns/op
Bytes allocated per iteration 60,310,811 B/op 60,326,300 B/op 15,489 B/op
Allocs per iteration 205,997 allocs/op 205,996 allocs/op -1 allocs/op
Metadata | | [main](https://github.com/k1LoW/runn/tree/main) (-) | [#945](https://github.com/k1LoW/runn/pull/945) ([9101806](https://github.com/k1LoW/runn/commit/9101806e6c127059e2de389b27ac153dab591a5a)) | |------------|----------------------------------------------------:|------------------------------------------------------------------------------------------------------------------------------------------:| | **goos** | linux | linux | | **goarch** | amd64 | amd64 | | **pkg** | github.com/k1LoW/runn | github.com/k1LoW/runn | | **cpu** | AMD EPYC 7763 64-Core Processor | AMD EPYC 7763 64-Core Processor |

Reported by octocov

github-actions[bot] commented 4 months ago

Code Metrics Report

main (7233b17) #945 (9101806) +/-
Coverage 64.1% 64.1% +0.0%
Code to Test Ratio 1:0.4 1:0.4 +0.0
Test Execution Time 5m19s 4m41s -38s
Details ``` diff | | main (7233b17) | #945 (9101806) | +/- | |---------------------|----------------|----------------|-------| + | Coverage | 64.1% | 64.1% | +0.0% | | Files | 75 | 76 | +1 | | Lines | 8227 | 8245 | +18 | + | Covered | 5280 | 5292 | +12 | + | Code to Test Ratio | 1:0.4 | 1:0.4 | +0.0 | | Code | 23626 | 23657 | +31 | + | Test | 11203 | 11235 | +32 | + | Test Execution Time | 5m19s | 4m41s | -38s | ```

Code coverage of files in pull request scope (0.0% → 2.2%)

Files Coverage +/-
cmd/coverage.go 0.0% 0.0%
cmd/list.go 0.0% 0.0%
cmd/loadt.go 0.0% 0.0%
cmd/run.go 0.0% 0.0%
env.go 75.0% +75.0%
flags/flags.go 0.0% 0.0%

Reported by octocov

k1LoW commented 4 months ago

@k2tzumi It would be nice to see about this fix, including whether it is --env-file or not!

github-actions[bot] commented 4 months ago

BenchmarkManyRunbooks-4

main (-) #945 (4e63acf) +/-
Number of iterations 1 1 0
Nanoseconds per iteration 3,877,076,960 ns/op 3,708,997,643 ns/op -168,079,317 ns/op
Bytes allocated per iteration 1,793,930,584 B/op 1,793,662,040 B/op -268,544 B/op
Allocs per iteration 21,427,381 allocs/op 21,427,340 allocs/op -41 allocs/op
Metadata | | [main](https://github.com/k1LoW/runn/tree/main) (-) | [#945](https://github.com/k1LoW/runn/pull/945) ([4e63acf](https://github.com/k1LoW/runn/commit/4e63acfefe5daeacd40575106e617d2ed62ba8b7)) | |------------|----------------------------------------------------:|------------------------------------------------------------------------------------------------------------------------------------------:| | **goos** | linux | linux | | **goarch** | amd64 | amd64 | | **pkg** | github.com/k1LoW/runn | github.com/k1LoW/runn | | **cpu** | AMD EPYC 7763 64-Core Processor | AMD EPYC 7763 64-Core Processor |

BenchmarkOpenAPI3-4

main (-) #945 (4e63acf) +/-
Number of iterations 1 1 0
Nanoseconds per iteration 5,077,890,088 ns/op 5,123,320,430 ns/op 45,430,342 ns/op
Bytes allocated per iteration 2,952,409,160 B/op 2,952,772,944 B/op 363,784 B/op
Allocs per iteration 29,390,773 allocs/op 29,385,461 allocs/op -5,312 allocs/op
Metadata | | [main](https://github.com/k1LoW/runn/tree/main) (-) | [#945](https://github.com/k1LoW/runn/pull/945) ([4e63acf](https://github.com/k1LoW/runn/commit/4e63acfefe5daeacd40575106e617d2ed62ba8b7)) | |------------|----------------------------------------------------:|------------------------------------------------------------------------------------------------------------------------------------------:| | **goos** | linux | linux | | **goarch** | amd64 | amd64 | | **pkg** | github.com/k1LoW/runn | github.com/k1LoW/runn | | **cpu** | AMD EPYC 7763 64-Core Processor | AMD EPYC 7763 64-Core Processor |

BenchmarkSingleRunbook-4

main (-) #945 (4e63acf) +/-
Number of iterations 16 18 2
Nanoseconds per iteration 63,410,337 ns/op 63,233,888 ns/op -176,449 ns/op
Bytes allocated per iteration 60,319,861 B/op 60,306,828 B/op -13,033 B/op
Allocs per iteration 205,914 allocs/op 205,901 allocs/op -13 allocs/op
Metadata | | [main](https://github.com/k1LoW/runn/tree/main) (-) | [#945](https://github.com/k1LoW/runn/pull/945) ([4e63acf](https://github.com/k1LoW/runn/commit/4e63acfefe5daeacd40575106e617d2ed62ba8b7)) | |------------|----------------------------------------------------:|------------------------------------------------------------------------------------------------------------------------------------------:| | **goos** | linux | linux | | **goarch** | amd64 | amd64 | | **pkg** | github.com/k1LoW/runn | github.com/k1LoW/runn | | **cpu** | AMD EPYC 7763 64-Core Processor | AMD EPYC 7763 64-Core Processor |

Reported by octocov

github-actions[bot] commented 4 months ago

Code Metrics Report

main (a1ccd4e) #945 (4e63acf) +/-
Coverage 64.1% 64.1% -0.1%
Code to Test Ratio 1:0.4 1:0.4 +0.0
Test Execution Time 5m24s 4m43s -41s
Details ``` diff | | main (a1ccd4e) | #945 (4e63acf) | +/- | |---------------------|----------------|----------------|-------| - | Coverage | 64.1% | 64.1% | -0.1% | | Files | 75 | 76 | +1 | | Lines | 8227 | 8249 | +22 | + | Covered | 5281 | 5290 | +9 | + | Code to Test Ratio | 1:0.4 | 1:0.4 | +0.0 | | Code | 23627 | 23662 | +35 | + | Test | 11203 | 11235 | +32 | + | Test Execution Time | 5m24s | 4m43s | -41s | ```

Code coverage of files in pull request scope (0.0% → 2.2%)

Files Coverage +/-
cmd/coverage.go 0.0% 0.0%
cmd/list.go 0.0% 0.0%
cmd/loadt.go 0.0% 0.0%
cmd/run.go 0.0% 0.0%
env.go 75.0% +75.0%
flags/flags.go 0.0% 0.0%

Reported by octocov

github-actions[bot] commented 4 months ago

BenchmarkManyRunbooks-4

main (-) #945 (4c0034c) +/-
Number of iterations 1 1 0
Nanoseconds per iteration 3,837,396,109 ns/op 3,772,360,000 ns/op -65,036,109 ns/op
Bytes allocated per iteration 1,793,687,448 B/op 1,793,740,624 B/op 53,176 B/op
Allocs per iteration 21,427,322 allocs/op 21,427,635 allocs/op 313 allocs/op
Metadata | | [main](https://github.com/k1LoW/runn/tree/main) (-) | [#945](https://github.com/k1LoW/runn/pull/945) ([4c0034c](https://github.com/k1LoW/runn/commit/4c0034c16d3e9477c90aba724f3f00b02b5b9913)) | |------------|----------------------------------------------------:|------------------------------------------------------------------------------------------------------------------------------------------:| | **goos** | linux | linux | | **goarch** | amd64 | amd64 | | **pkg** | github.com/k1LoW/runn | github.com/k1LoW/runn | | **cpu** | AMD EPYC 7763 64-Core Processor | AMD EPYC 7763 64-Core Processor |

BenchmarkOpenAPI3-4

main (-) #945 (4c0034c) +/-
Number of iterations 1 1 0
Nanoseconds per iteration 5,359,362,320 ns/op 5,128,988,516 ns/op -230,373,804 ns/op
Bytes allocated per iteration 2,952,291,440 B/op 2,951,926,344 B/op -365,096 B/op
Allocs per iteration 29,382,331 allocs/op 29,381,855 allocs/op -476 allocs/op
Metadata | | [main](https://github.com/k1LoW/runn/tree/main) (-) | [#945](https://github.com/k1LoW/runn/pull/945) ([4c0034c](https://github.com/k1LoW/runn/commit/4c0034c16d3e9477c90aba724f3f00b02b5b9913)) | |------------|----------------------------------------------------:|------------------------------------------------------------------------------------------------------------------------------------------:| | **goos** | linux | linux | | **goarch** | amd64 | amd64 | | **pkg** | github.com/k1LoW/runn | github.com/k1LoW/runn | | **cpu** | AMD EPYC 7763 64-Core Processor | AMD EPYC 7763 64-Core Processor |

BenchmarkSingleRunbook-4

main (-) #945 (4c0034c) +/-
Number of iterations 18 18 0
Nanoseconds per iteration 64,631,523 ns/op 64,765,947 ns/op 134,424 ns/op
Bytes allocated per iteration 60,328,375 B/op 60,287,599 B/op -40,776 B/op
Allocs per iteration 205,918 allocs/op 205,873 allocs/op -45 allocs/op
Metadata | | [main](https://github.com/k1LoW/runn/tree/main) (-) | [#945](https://github.com/k1LoW/runn/pull/945) ([4c0034c](https://github.com/k1LoW/runn/commit/4c0034c16d3e9477c90aba724f3f00b02b5b9913)) | |------------|----------------------------------------------------:|------------------------------------------------------------------------------------------------------------------------------------------:| | **goos** | linux | linux | | **goarch** | amd64 | amd64 | | **pkg** | github.com/k1LoW/runn | github.com/k1LoW/runn | | **cpu** | AMD EPYC 7763 64-Core Processor | AMD EPYC 7763 64-Core Processor |

Reported by octocov

github-actions[bot] commented 4 months ago

Code Metrics Report

main (a1ccd4e) #945 (4c0034c) +/-
Coverage 64.1% 64.0% -0.1%
Code to Test Ratio 1:0.4 1:0.4 +0.0
Test Execution Time 5m24s 4m36s -48s
Details ``` diff | | main (a1ccd4e) | #945 (4c0034c) | +/- | |---------------------|----------------|----------------|-------| - | Coverage | 64.1% | 64.0% | -0.1% | | Files | 75 | 76 | +1 | | Lines | 8227 | 8253 | +26 | + | Covered | 5281 | 5290 | +9 | + | Code to Test Ratio | 1:0.4 | 1:0.4 | +0.0 | | Code | 23627 | 23670 | +43 | + | Test | 11203 | 11235 | +32 | + | Test Execution Time | 5m24s | 4m36s | -48s | ```

Code coverage of files in pull request scope (0.0% → 2.1%)

Files Coverage +/-
cmd/coverage.go 0.0% 0.0%
cmd/list.go 0.0% 0.0%
cmd/loadt.go 0.0% 0.0%
cmd/run.go 0.0% 0.0%
env.go 75.0% +75.0%
flags/flags.go 0.0% 0.0%

Reported by octocov

k1LoW commented 4 months ago

@k2tzumi Thank you!