Skip to content

Commit

Permalink
Merge pull request #3 from joamag/joamag/logic
Browse files Browse the repository at this point in the history
Better Logic
  • Loading branch information
joamag committed Jun 14, 2023
2 parents 123f1ce + 42926ea commit b89359e
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 5 deletions.
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()

0 comments on commit b89359e

Please sign in to comment.