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