xref: /libCEED/.github/workflows/python-test-with-style.yml (revision b0ae8d517c946075df97529a50d1cf3d819480eb)
1dfb8ed23Sjeremyltname: Python
23446d1b5SJeremy L Thompson
33446d1b5SJeremy L Thompsonon:
43446d1b5SJeremy L Thompson  push:
53446d1b5SJeremy L Thompson
63446d1b5SJeremy L Thompsonjobs:
73446d1b5SJeremy L Thompson  test:
83446d1b5SJeremy L Thompson    strategy:
93446d1b5SJeremy L Thompson      matrix:
10*b0ae8d51SJed Brown        os: [ubuntu-20.04]
113446d1b5SJeremy L Thompson        compiler: [gcc-9]
123446d1b5SJeremy L Thompson
133446d1b5SJeremy L Thompson    runs-on: ${{ matrix.os }}
143446d1b5SJeremy L Thompson
153446d1b5SJeremy L Thompson    steps:
163446d1b5SJeremy L Thompson    - name: Environment setup
173446d1b5SJeremy L Thompson      uses: actions/checkout@v2
183446d1b5SJeremy L Thompson    - name: Python setup
193446d1b5SJeremy L Thompson      uses: actions/setup-python@v2
203446d1b5SJeremy L Thompson    - name: Python dependencies
213446d1b5SJeremy L Thompson      run: |
223446d1b5SJeremy L Thompson        pip install -r requirements.txt
233446d1b5SJeremy L Thompson        pip install -r requirements-test.txt
243446d1b5SJeremy L Thompson    - name: Python test
253446d1b5SJeremy L Thompson      env:
263446d1b5SJeremy L Thompson        CC: ${{ matrix.compiler }}
273446d1b5SJeremy L Thompson        FC: gfortran-9
283446d1b5SJeremy L Thompson      run: |
293446d1b5SJeremy L Thompson        make info
303446d1b5SJeremy L Thompson        make -j2
313446d1b5SJeremy L Thompson        export CEED_DIR=$PWD
323446d1b5SJeremy L Thompson        pip install .
333446d1b5SJeremy L Thompson        cd tests/python
343446d1b5SJeremy L Thompson        python setup-qfunctions.py build
353446d1b5SJeremy L Thompson        pytest test-*.py --ceed /cpu/self/ref/serial -vv
363446d1b5SJeremy L Thompson        cd ../..
373446d1b5SJeremy L Thompson    - name: Python style
383446d1b5SJeremy L Thompson      env:
393446d1b5SJeremy L Thompson        CC: ${{ matrix.compiler }}
403446d1b5SJeremy L Thompson        FC: gfortran-9
413446d1b5SJeremy L Thompson      run: |
423446d1b5SJeremy L Thompson        make style-py && git diff --exit-code
43