Skip to content

Bug fixes for dual porosity #98

Bug fixes for dual porosity

Bug fixes for dual porosity #98

name: Ubuntu
on:
pull_request:
jobs:
run-pycopm-ubuntu:
permissions:
contents: read
pull-requests: write
timeout-minutes: 30
runs-on: ubuntu-24.04
container:
image: ubuntu:26.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install system dependencies
run: |
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get install -y \
python3 python3-pip python3-venv \
build-essential git curl ca-certificates \
software-properties-common \
octave \
mpi-default-bin \
freeglut3-dev \
libhdf5-dev
ln -s /usr/bin/python3 /usr/bin/python || true
- name: Install Flow Simulator
run: |
apt-get update
apt-add-repository ppa:opm/ppa
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get install -y libopm-simulators-bin
- name: Install python requirements
run: |
python3 -m venv vpycopm
. vpycopm/bin/activate
echo "$PWD/vpycopm/bin" >> $GITHUB_PATH
pip install --upgrade pip setuptools wheel
pip install -e .
pip install -r dev-requirements.txt
- name: Check code style and linting
run: |
black --target-version py312 src/ tests/ --check
pylint src/ tests/
mypy --ignore-missing-imports src/ tests/
- name: Run tests
run: |
pytest --cov=pycopm --cov-report term-missing --basetemp=test_outputs tests/ --exitfirst
- name: Run hello world example
run: |
pycopm -i examples/decks/HELLO_WORLD.DATA -c 5,5,1 -m all -o output
- name: Check if hello world example succeded
run: |
file="output/HELLO_WORLD_PYCOPM.EGRID"
if [ -f "$file" ]; then
echo "pycopm succeeded"
else
echo "pycopm failed"
exit 1
fi
- name: Build documentation
run: |
cd docs
make html