xref: /libCEED/.github/workflows/python-test-with-style.yml (revision 619db83ca0bfb3c95755a4b437abc8047796c977)
1name: Python
2
3on:
4  push:
5
6jobs:
7  test:
8    strategy:
9      matrix:
10        os: [ubuntu-20.04]
11        compiler: [gcc-9]
12
13    runs-on: ${{ matrix.os }}
14
15    steps:
16    - name: Environment setup
17      uses: actions/checkout@v2
18    - name: Python setup
19      uses: actions/setup-python@v2
20    - name: Python dependencies
21      run: |
22        pip install -r requirements.txt
23        pip install -r requirements-test.txt
24    - name: Python test
25      env:
26        CC: ${{ matrix.compiler }}
27        FC: gfortran-9
28      run: |
29        make info
30        make -j2
31        export CEED_DIR=$PWD
32        pip install .
33        cd tests/python
34        PYTHON=python3 make test TEST_OPTS="--ceed /cpu/self/ref/serial -vv"
35        cd ../..
36    - name: Python style
37      env:
38        CC: ${{ matrix.compiler }}
39        FC: gfortran-9
40      run: |
41        make style-py && git diff --exit-code
42