Skip to content

Instantly share code, notes, and snippets.

@thuwarakeshm
Last active January 31, 2022 14:07
Show Gist options
  • Save thuwarakeshm/5c4d8a1761b68b9efb33900ca39e1125 to your computer and use it in GitHub Desktop.
Save thuwarakeshm/5c4d8a1761b68b9efb33900ca39e1125 to your computer and use it in GitHub Desktop.
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
jobs:
build:
runs-on: ubuntu-latest
env:
FIB_INPUT: 10
services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: postgres
on:
push:
branches: [ dev ]
pull_request:
branches: [ main ]
on:
schedule:
- cron: '0 0 * * 0'
# 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
# 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