-
Notifications
You must be signed in to change notification settings - Fork 2
70 lines (53 loc) · 1.73 KB
/
main.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: Build and tests
on: [push]
# on:
# pull_request:
# branches:
# - main
jobs:
build:
name: Build project
runs-on: ubuntu-latest
# runs-on: python:latest
steps:
- uses: actions/checkout@v4
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: "3.8"
cache: "pip" # caching pip dependencies
- name: Update pip
run: pip install --upgrade pip
- name: Install dependencies and pydaes (pydaes)
run: pip install -e .
- name: Install test dependencies
run: pip install pytest pytest-cov
# - name: Test with pytest
# run: pytest ./test/
- name: Coverage report with pytest-cov
# run: pytest --cov=pydaes
run: pytest --cov=pydaes --cov-report=term --cov-report=lcov --cov-report=xml
- name: Creating coverage folder
run: |
mkdir -p coverage
- name: Coverage Bagdge
uses: tj-actions/coverage-badge-py@v1.8
with:
output: coverage/coverage.svg
- name: Publish coverage report to coverage-badge branch
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: coverage-badge
folder: coverage
# - name: Run tests and collect coverage
# run: pytest --cov app ${{ env.CODECOV_ATS_TESTS }}
# # - name: Upload coverage data
# # uses: actions/upload-artifact@v3
# # with:
# # name: covdata
# # path: coverage.xml
# - name: Upload coverage reports to Codecov
# uses: codecov/codecov-action@v4.0.1
# with:
# token: ${{ secrets.CODECOV_TOKEN }}
# # [![codecov](https://img.shields.io/codecov/c/github/nschloe/meshio.svg?style=flat-square)](https://app.codecov.io/gh/nschloe/meshio)