]> git.k1024.org Git - pyxattr.git/blob - .github/workflows/ci.yml
Remove verbose from the codecov action
[pyxattr.git] / .github / workflows / ci.yml
1 on: [push]
2 name: CI
3 jobs:
4   build:
5     name: Build and test
6     runs-on: ${{ matrix.os }}
7     strategy:
8       matrix:
9         os: [ubuntu-latest]
10         python-version: ['3.5', '3.6', '3.7', '3.8', '3.9']
11         include:
12           - os: ubuntu-18.04
13             python-version: '3.4'
14             installTyping: ${{ true }}
15       fail-fast: false
16
17     steps:
18       - name: Checkout
19         uses: actions/checkout@v2
20
21       - name: Set up Python ${{ matrix.python-version }}
22         uses: actions/setup-python@v2
23         with:
24           python-version: ${{ matrix.python-version }}
25
26       - name: Cache pip
27         uses: actions/cache@v2
28         with:
29           # This path is specific to Ubuntu
30           path: ~/.cache/pip
31           # Look to see if there is a cache hit for the corresponding requirements file
32           key: v1-pip-${{ runner.os }}-${{ matrix.python-version }}
33           restore-keys: |
34             v1-pip-${{ runner.os }}
35             v1-pip-
36
37       - name: Install dependencies
38         run: |
39           pip install pytest
40           pip install codecov
41
42       - name: Install typing for old Python
43         run: pip install typing
44         if: matrix.installTyping
45
46       - name: Install lcov
47         run: sudo apt install -yy lcov
48
49       - name: Build the code
50         run: python ./setup.py build_ext -i
51
52       - name: Run tests
53         run: python -m pytest tests
54
55       - name: Cleanup
56         run: make clean
57
58       - name: Re-build with coverage info
59         run: CFLAGS="-coverage" python ./setup.py build_ext -i
60
61       - name: Test with coverage
62         run: python -m pytest tests
63
64       - name: Convert data with lcov
65         run: lcov --capture --no-external --directory . --output-file coverage.info
66
67       - name: Coveralls Parallel
68         uses: coverallsapp/github-action@master
69         with:
70           github-token: ${{ secrets.github_token }}
71           flag-name: run-${{ matrix.os }}-${{ matrix.python-version }}
72           parallel: true
73           path-to-lcov: coverage.info
74
75       - name: Upload coverage to Codecov
76         uses: codecov/codecov-action@v1
77         with:
78           #files: ./coverage1.xml,./coverage2.xml
79           #directory: ./coverage/reports/
80           #flags: unittests
81           #env_vars: OS,PYTHON
82           name: codecov-umbrella
83           #fail_ci_if_error: true
84           path_to_write_report: ./coverage/codecov_report.txt
85           #verbose: true
86
87   finish:
88     needs: build
89     runs-on: ubuntu-latest
90     steps:
91     - name: Coveralls Finished
92       uses: coverallsapp/github-action@master
93       with:
94         github-token: ${{ secrets.github_token }}
95         parallel-finished: true