Skip to content

Commit 42ea30d

Browse files
added tests (#92)
1 parent d416547 commit 42ea30d

File tree

1 file changed

+23
-8
lines changed

1 file changed

+23
-8
lines changed

.github/workflows/tests.yml

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,38 @@ on:
99
jobs:
1010

1111
smoke-test:
12+
strategy:
13+
matrix:
14+
args:
15+
- "--invites"
16+
- "--commits"
17+
- "--pull_requests"
18+
- "--issues"
19+
- "--wikis"
20+
- "--contributors"
1221

1322
runs-on: ubuntu-latest
1423

1524
steps:
1625
- uses: actions/checkout@v4
1726

18-
- name: Create list.txt
19-
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-
2034
2135
- name: Install dependencies
2236
run: pip install -r requirements.txt
2337

38+
- name: Create list.txt
39+
run: echo "moevm/github_repo_commitment_calc" > list.txt
40+
2441
- name: Run test
25-
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
2644
2745
- name: Check if out.csv exists
2846
run: ls out.csv
@@ -31,8 +49,5 @@ jobs:
3149
if: failure()
3250
run: exit 1
3351

34-
- name: Upload test results
35-
uses: actions/upload-artifact@v4
36-
with:
37-
name: test-results
38-
path: out.csv
52+
- name: Show out.csv
53+
run: cat out.csv

0 commit comments

Comments
 (0)