Skip to content

Instantly share code, notes, and snippets.

View ahmedbesbes's full-sized avatar
💭
Building things, one line of code at a time 💻

Ahmed BESBES ahmedbesbes

💭
Building things, one line of code at a time 💻
View GitHub Profile
name: Makefile CI
on:
push:
branches: [ $default-branch ]
pull_request:
branches: [ $default-branch ]
jobs:
build:
# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: Upload Python Package
name: Docker Image CI
on:
push:
branches: [ $default-branch ]
pull_request:
branches: [ $default-branch ]
jobs:
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Python application
on:
push:
branches: [ $default-branch ]
pull_request:
branches: [ $default-branch ]
on:
push:
branches:
- main
jobs:
print_hello:
runs-on: ubuntu-latest
steps:
- run: echo "Hello World!"
on:
push:
branches:
- main
jobs:
print_hello:
runs-on: ubuntu-latest
steps:
- run: echo "Hello World!"
assert (0 <= discount_rate <= 1, "Discount rate should between 0 and 1")
def delete_item(item_id, user):
if not user.is_admin():
raise AuthError('Must be admin to delete')
user.delete_item(item_id)
def delete_item(item_id, user):
assert user.is_admin(), 'Must be admin'
user.delete_item(item_id)