read inputs from env variables

This commit is contained in:
vky 2022-01-23 12:30:42 +01:00
parent 4f7e38ac65
commit 21db4d48de
2 changed files with 8 additions and 2 deletions

View File

@ -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

View File

@ -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