-
-
Notifications
You must be signed in to change notification settings - Fork 5
53 lines (45 loc) · 1.49 KB
/
testing_ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: CI
on:
push:
branches:
- main
- dev
- temp_test_branch # if in need, create such a temporary branch to test some functions
pull_request:
branches:
- dev
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, windows-latest, macOS-latest ]
python-version: ["3.8","3.11"]
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
check-latest: true
cache: pip
cache-dependency-path: |
requirements.txt
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install numpy==1.24
pip install -r requirements.txt
pip install pytest coverage
- name: Test with pytest
run: |
coverage run --source=pygrinder -m pytest
- name: Write the LCOV report
run: |
coverage lcov
- name: Submit report
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: 'coverage.lcov'