read inputs from env variables
This commit is contained in:
parent
4f7e38ac65
commit
21db4d48de
|
|
@ -8,7 +8,7 @@
|
|||
# We have attempted to detect the languages in your repository. Please check
|
||||
# the `language` matrix defined below to confirm you have the correct set of
|
||||
# supported CodeQL languages.
|
||||
#
|
||||
|
||||
name: "CodeQL"
|
||||
|
||||
on:
|
||||
|
|
@ -68,3 +68,7 @@ jobs:
|
|||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v1
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
FIB_INPUT: 10
|
||||
|
|
@ -1,7 +1,9 @@
|
|||
import os
|
||||
|
||||
# testing Fibonacci number function
|
||||
def fib(n: int) -> int:
|
||||
return n if n < 2 else fib(n-1)+fib(n-2)
|
||||
|
||||
|
||||
def test_fibonacci():
|
||||
assert fib(10) == 54
|
||||
assert fib(int(os.environ["FIB_INPUT"])) == 55
|
||||
Loading…
Reference in New Issue