xref: /libCEED/.github/workflows/python-test-with-style.yml (revision 0adbbf50dce0fd0a32cc04fdb6b3829bb2cdb133)
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:
106c0547c1SJeremy L Thompson        os: [ubuntu-22.04]
116c0547c1SJeremy L Thompson        compiler: [gcc-11]
123446d1b5SJeremy L Thompson
133446d1b5SJeremy L Thompson    runs-on: ${{ matrix.os }}
143446d1b5SJeremy L Thompson
153446d1b5SJeremy L Thompson    steps:
163446d1b5SJeremy L Thompson    - name: Environment setup
17*0adbbf50SJeremy L Thompson      uses: actions/checkout@v3
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 }}
276c0547c1SJeremy L Thompson        FC: gfortran-11
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 .
330ef72598Sjeremylt        cd python/tests
34619db83cSjeremylt        PYTHON=python3 make test TEST_OPTS="--ceed /cpu/self/ref/serial -vv"
353446d1b5SJeremy L Thompson        cd ../..
363446d1b5SJeremy L Thompson    - name: Python style
373446d1b5SJeremy L Thompson      env:
383446d1b5SJeremy L Thompson        CC: ${{ matrix.compiler }}
396c0547c1SJeremy L Thompson        FC: gfortran-11
403446d1b5SJeremy L Thompson      run: |
413446d1b5SJeremy L Thompson        make style-py && git diff --exit-code
42