Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 54 additions & 3 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,28 @@ on:
pull_request:
branches:
- "*"
workflow_dispatch:

concurrency:
group: ${ {github.event_name }}-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{github.event_name == 'pull_request'}}

jobs:
pre-commit:
name: pre-commit checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Run pre-commit
uses: pre-commit/action@v3.0.1

run_tox:
name: Run mocked tests
name: mocked tests
needs: [pre-commit]
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
Expand Down Expand Up @@ -39,8 +57,40 @@ jobs:
export PKG_CONFIG_PATH=$(readlink -f "precice-core/build")
tox

build_dist:
name: build distributions
needs: [pre-commit]
runs-on: ubuntu-latest
container:
image: precice/precice:nightly
options: --user root
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Configure safe directory
run: git config --global --add safe.directory $GITHUB_WORKSPACE
- name: Install dependencies
run: |
apt-get -yy update
apt-get install -y python3-pip python3.12-venv pkg-config pipx
rm -rf /var/lib/apt/lists/*
- name: Install pyproject-build
run: |
pipx install build
- name: Build sdist
run: |
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
$HOME/.local/bin/pyproject-build -s
- name: Build wheel
run: |
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
$HOME/.local/bin/pyproject-build -w

pip_install:
name: Run pip install
name: pip install
needs: [pre-commit]
runs-on: ubuntu-latest
container:
image: precice/precice:nightly
Expand Down Expand Up @@ -69,8 +119,9 @@ jobs:
.venv/bin/python3 -c "import precice; print(precice.__version__)"
.venv/bin/python3 -c "import precice; print(precice.get_version_information())"


solverdummy_test:
name: Run solverdummy
name: solverdummies
needs: [pip_install]
runs-on: ubuntu-latest
container:
Expand Down
14 changes: 0 additions & 14 deletions .github/workflows/check-markdown.yml

This file was deleted.

21 changes: 0 additions & 21 deletions .github/workflows/check-pep8.yml

This file was deleted.

39 changes: 0 additions & 39 deletions .github/workflows/run-solverdummy.yml

This file was deleted.

8 changes: 8 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,11 @@ repos:
hooks:
- id: check-github-workflows
args: ["--verbose"]

- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.39.0
hooks:
- id: markdownlint
exclude: "^changelog-entries/"
- id: markdownlint-fix
exclude: "^changelog-entries/"