]> git.k1024.org Git - pyxattr.git/blob - .github/workflows/ci.yml
Stop uploading to coveralls
[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: Build the code
47         run: python ./setup.py build_ext -i
48
49       - name: Run tests
50         run: python -m pytest tests
51
52       - name: Cleanup
53         run: make clean
54
55       - name: Re-build with coverage info
56         run: CFLAGS="-coverage" python ./setup.py build_ext -i
57
58       - name: Test with coverage
59         run: python -m pytest tests
60
61       - name: Upload coverage to Codecov
62         uses: codecov/codecov-action@v1
63         with:
64           #files: ./coverage1.xml,./coverage2.xml
65           #directory: ./coverage/reports/
66           #flags: unittests
67           #env_vars: OS,PYTHON
68           name: codecov-python-${{ matrix.python-version }}
69           #fail_ci_if_error: true
70           path_to_write_report: ./codecov_report.txt
71           #verbose: true