Last active
January 31, 2022 14:07
-
-
Save thuwarakeshm/5c4d8a1761b68b9efb33900ca39e1125 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(int(os.environ["FIB_INPUT"])) == 55 # It was 54 before |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
FIB_INPUT: 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
services: | |
postgres: | |
image: postgres | |
env: | |
POSTGRES_PASSWORD: postgres |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
branches: [ dev ] | |
pull_request: | |
branches: [ main ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
schedule: | |
- cron: '0 0 * * 0' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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) == 55 # It was 54 before |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment