Skip to content

Commit d953e5b

Browse files
Added ci pipeline Merge pull request #11
Closes ticket #4
2 parents 140ff9b + ce11820 commit d953e5b

6 files changed

Lines changed: 50 additions & 2 deletions

File tree

.github/workflows/unit-test.yaml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Unit Test Linux
2+
3+
on:
4+
push:
5+
# pull_request:
6+
7+
jobs:
8+
run-tests:
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
os: [ubuntu-latest]
13+
python-version:
14+
- "3.10"
15+
- "3.11"
16+
17+
name: unit-test
18+
runs-on: ${{ matrix.os }}
19+
# runs-on: python:alpine
20+
21+
steps:
22+
- name: Checkout code
23+
uses: actions/checkout@v3
24+
25+
- name: Set up Python
26+
uses: actions/setup-python@v4
27+
with:
28+
python-version : ${{ matrix.python-version }}
29+
30+
- name: Install dependencies
31+
run: |
32+
python -m pip install -r requirements.txt
33+
34+
- name: Check if installed packages confirm with requirements.txt
35+
run: |
36+
pip freeze -r requirements.txt
37+
38+
- name: Run tests
39+
run: |
40+
python -m unittest discover -v
41+
42+

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1-
# Helper app
1+
# Helper app
2+
3+
[![Unit Test Linux](https://github.com/Python-Dojo/Dojo-Helper-App/actions/workflows/unit-test.yaml/badge.svg?branch=main)](https://github.com/Python-Dojo/Dojo-Helper-App/actions/workflows/unit-test.yaml)
4+
25
This is an app to help the hosts of the fortnightly Dojo hosts do the common tasks quicky and effectively. This will include making the replit repos, placing invite links in the discord channel, coping the written code to the github archive and sending a link in the discord channel.
36
Updates and tickets can be found on the projects page for bounty hunters to complete.

funcs/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# placeholder file to modularize (to package) .py files under the directory "funcs", making the files importable.
File renamed without changes.

tests/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# placeholder file to modularize (to package) .py files under the directory "tests", making the files importable.

test_func.py renamed to tests/test_func.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import unittest, func
1+
import unittest
2+
from funcs import func
23

34
class Test(unittest.TestCase):
45

0 commit comments

Comments
 (0)