Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better Logic #3

Merged
merged 4 commits into from
Jun 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Main Workflow
on:
push:
schedule:
- cron: "0 0 * * 0"
jobs:
build:
name: Build
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- name: Checkout code from repository
uses: actions/checkout@v3
5 changes: 2 additions & 3 deletions .mergify/config.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
shared:
my_ci: &common_checks
- check-success=ci-one
- check-success=ci-two
- check-success=build

queue_rules:
- name: hotfix
merge_conditions: *common_checks

- name: default
merge_conditions:
- check-success=slow-ci
- check-success=build
- and: *common_checks

pull_request_rules:
Expand Down
Binary file added __pycache__/main.cpython-310.pyc
Binary file not shown.
10 changes: 10 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-


def hello():
print("hello world")


def sum_two_numbers(a, b):
return a + b
19 changes: 17 additions & 2 deletions test.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,17 @@
def tobias():
print("hello world")
#!/usr/bin/python
# -*- coding: utf-8 -*-

import unittest

from main import sum_two_numbers


class TestSum(unittest.TestCase):
def test_sum(self):
self.assertEqual(sum_two_numbers(2, 3), 5)
self.assertEqual(sum_two_numbers(0, 0), 0)
self.assertEqual(sum_two_numbers(-1, 1), 0)


if __name__ == "__main__":
unittest.main()