Skip to content

Commit d9d104b

Browse files
f
1 parent 15b15f3 commit d9d104b

File tree

1 file changed

+29
-11
lines changed

1 file changed

+29
-11
lines changed

.github/workflows/tests.yml

Lines changed: 29 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,46 @@
1-
name: Tests
1+
name: Smoke Tests
22

33
on:
44
push:
5+
branches: [ "master" ]
6+
pull_request:
7+
branches: [ "master" ]
58

69
jobs:
7-
810
smoke-test:
11+
strategy:
12+
matrix:
13+
args:
14+
- "--invites"
15+
- "--commits"
16+
- "--pull_requests"
17+
- "--issues"
18+
- "--wikis"
19+
- "--contributors"
20+
- "--workflow_runs"
921

1022
runs-on: ubuntu-latest
1123

1224
steps:
1325
- uses: actions/checkout@v4
1426

15-
- name: Create list.txt
16-
run: echo "OSLL/github_repo_commitment_calc" > list.txt
27+
- name: Cache pip
28+
uses: actions/cache@v3
29+
with:
30+
path: ~/.cache/pip
31+
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
32+
restore-keys: |
33+
${{ runner.os }}-pip-
1734
1835
- name: Install dependencies
1936
run: pip install -r requirements.txt
2037

38+
- name: Create list.txt
39+
run: echo "thehighestmath/SummerPractice" > list.txt
40+
2141
- name: Run test
22-
run: python3 main.py --commits --token ${{ secrets.TEST_TOKEN_GITHUB }} --list list.txt --out out.csv --branch master
42+
run: |
43+
python3 main.py ${{ matrix.args }} --token ${{ secrets.TEST_TOKEN_GITHUB }} --list list.txt --out out.csv --branch master
2344
2445
- name: Check if out.csv exists
2546
run: ls out.csv
@@ -28,6 +49,9 @@ jobs:
2849
if: failure()
2950
run: exit 1
3051

52+
- name: Show out.csv
53+
run: cat out.csv
54+
3155
- name: Check header in first line
3256
run: |
3357
HEADER="repository name,author name,author login,author email,date and time,changed files,commit id,branch"
@@ -39,9 +63,3 @@ jobs:
3963
echo "Header is invalid"
4064
exit 1
4165
fi
42-
43-
- name: Upload test results
44-
uses: actions/upload-artifact@v4
45-
with:
46-
name: test-results
47-
path: out.csv

0 commit comments

Comments
 (0)