]> git.k1024.org Git - pyxattr.git/blob - .github/workflows/ci.yml
Initial github actions-based continous build
[pyxattr.git] / .github / workflows / ci.yml
1 on: [push]
2 name: Continuous Integration
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           gem install --user-install coveralls-lcov
40           pip install pytest
41           pip install codecov
42
43       - name: Install typing for old Python
44         run: pip install typing
45         if: matrix.installTyping
46
47       - name: Build the code
48         run: python ./setup.py build_ext -i
49
50       - name: Run tests
51         run: python -m pytest tests