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
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
name: System tests (manual/nightly)
name: System tests (manual)

on:
schedule:
- cron: "0 2 * * *"
timezone: "Europe/Berlin"
workflow_dispatch:
inputs:
suites:
Expand Down Expand Up @@ -58,7 +55,7 @@ on:
jobs:
run-system-tests:
name: Trigger system tests
uses: precice/tutorials/.github/workflows/system-tests.yml@develop
uses: ./.github/workflows/system-tests.yml
with:
suites: ${{ inputs.suites || 'release' }}
build_args: "TUTORIALS_REF:${{ inputs.ref-tutorials }},\
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/system-tests-nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: System tests (nightly)

on:
schedule:
- cron: "0 2 * * *"
timezone: "Europe/Berlin"

jobs:
run-system-tests:
name: Trigger system tests
uses: ./.github/workflows/system-tests.yml
with:
suites: 'release'
2 changes: 1 addition & 1 deletion .github/workflows/system-tests-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
run-system-tests:
name: Trigger system tests
if: ${{ github.event.label.name == 'trigger-system-tests' }}
uses: precice/tutorials/.github/workflows/system-tests.yml@develop
uses: ./.github/workflows/system-tests.yml
with:
suites: release
build_args: "TUTORIALS_PR:${{ github.event.number }},\
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: System tests (extra cases)
name: System tests (weekly - extra)

on:
schedule:
Expand All @@ -8,6 +8,6 @@ on:
jobs:
run-system-tests:
name: Trigger system tests
uses: precice/tutorials/.github/workflows/system-tests.yml@develop
uses: ./.github/workflows/system-tests.yml
with:
suites: 'extra'
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# preCICE tutorials

[![System tests (latest components)](https://github.com/precice/tutorials/actions/workflows/system-tests-latest-components.yml/badge.svg)](https://github.com/precice/tutorials/actions/workflows/system-tests-latest-components.yml)
[![System tests (nightly)](https://github.com/precice/tutorials/actions/workflows/system-tests-nightly.yml/badge.svg)](https://github.com/precice/tutorials/actions/workflows/system-tests-nightly.yml)
[![System tests (weekly - extra)](https://github.com/precice/tutorials/actions/workflows/system-tests-weekly.yml/badge.svg)](https://github.com/precice/tutorials/actions/workflows/system-tests-weekly.yml)

> [!IMPORTANT]
> This repository is aimed for development purposes and the default branch is `develop`. If you want to use the tutorials, switch to the [`master` branch](https://github.com/precice/tutorials/tree/master) or download the latest [release](https://github.com/precice/tutorials/releases).
Expand Down
1 change: 1 addition & 0 deletions changelog-entries/875.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Split the `system-tests-latest-components.yml` into `system-tests-manual.yml` and `system-tests-nightly.yml`. Renamed `system-tests-extra.yml` to `system-tests-weekly.yml`. [#875](https://github.com/precice/tutorials/pull/875)
18 changes: 11 additions & 7 deletions tools/tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ The tutorials repository hosts cases that need multiple components from the preC

## Running

The main workflow for the user is executing the `systemtests.py` script, which is the same that the [GitHub Actions workflow](https://github.com/precice/tutorials/actions/workflows/system-tests-latest-components.yml) executes. Depending on the options given to the script, it reads in the respective metadata files and generates `docker-compose.yaml` files that can start a fully-defined coupled simulation. For arguments that are not provided, default values from `components.yaml` are used.
The main workflow for the user is executing the `systemtests.py` script, which is the same that the [GitHub Actions workflow](https://github.com/precice/tutorials/actions/workflows/system-tests.yml) executes. Depending on the options given to the script, it reads in the respective metadata files and generates `docker-compose.yaml` files that can start a fully-defined coupled simulation. For arguments that are not provided, default values from `components.yaml` are used.

### Manual and nightly runs on GitHub
### Manual and scheduled runs on GitHub

The [System tests (manual/nightly)](https://github.com/precice/tutorials/actions/workflows/system-tests-latest-components.yml) workflow executes the `release` test suite nightly and can also be triggered manually.
The [System tests (manual)](https://github.com/precice/tutorials/actions/workflows/system-tests-manual.yml) workflow can execute any test suite (default: `release`) with any versions of the involved components (default: latest development branches).

On the workflow page, click `Run workflow`. The default values will execute the `release` test suite using the latest `develop` branches of every component. If you want to override the version of some component, specify it in the respective field. Commit hashes, branches, and tags are all accepted. Branches and tags will get automatically resolved to their current commit on GitHub before starting any test, and all tests will use the same version of any common component.

Expand All @@ -31,6 +31,8 @@ The available test suites are found in [`tests.yaml`](https://github.com/precice

The `Use workflow from` is a default option of GitHub Actions that concerns the GHA workflow file itself.

The [System tests (nightly)](https://github.com/precice/tutorials/actions/workflows/system-tests-nightly.yml) executes the `release` test suite every night. The [System tests (weekly)](https://github.com/precice/tutorials/actions/workflows/system-tests-weekly.yml) executes the `extra` test suite once per week.

### Running from a pull request

Several repositories include a workflow that allows triggering the system tests by adding the `trigger-system-tests` label to the pull request. The event is triggered only at the moment of adding the label, so you need to remove the label and add it again if needed.
Expand All @@ -42,13 +44,13 @@ See the [system tests workflow in the OpenFOAM adapter](https://github.com/preci
The [GitHub CLI](https://cli.github.com/) allows triggering workflows of a GitHub project. For example:

```bash
gh workflow run system-tests-latest-components.yml -f suites=release
gh workflow run system-tests-manual.yml -f suites=release
```

More arguments are available, for example:

```bash
gh workflow run system-tests-latest-components.yml -f suites=release -f build_args="PLATFORM:ubuntu2404,PRECICE_REF:develop" -f log_level="DEBUG" --ref=develop
gh workflow run system-tests-manual.yml -f suites=release -f build_args="PLATFORM:ubuntu2404,PRECICE_REF:develop" -f log_level="DEBUG" --ref=develop
```

The `build_args` override the defaults set in `tools/tests/components.yaml`.
Expand Down Expand Up @@ -214,7 +216,7 @@ To add a new component, a few changes are needed:

1. In the `components.yaml`, add a new component, defining all the parameters that it might need.
- Add these parameters into the `reference_versions.yaml`.
- Add fields for these parameters into the `system-tests-latest-components.yml` workflow.
- Add fields for these parameters into the `system-tests-manual.yml` workflow.
2. In the `dockerfiles/<platform>/Dockerfile`, define a new stage for building your new component. Use the parameters you defined above.
- Defining a `<component>_PR` variable will let you integrate the system tests into the respective component repository.
3. In the `component_templates.yaml`, define a component template. These are Jinja templates that are used by Docker Compose, and the main detail is how to run a simulation using that component.
Expand Down Expand Up @@ -258,7 +260,9 @@ Metadata and workflow/script files:

- `.github/workflows/`
- `system-tests.yml`: workflow for running the tests, triggered by other workflows (e.g., other repositories)
- `system-tests-latest-components.yml`: manual triggering front-end for `system-tests.yml`
- `system-tests-manual.yml`: manual triggering front-end for `system-tests.yml`
- `system-tests-nightly.yml`: scheduled run of `system-tests.yml` (every night)
- `system-tests-weekly.yml`: scheduled run of `system-tests.yml` (once per week)
- `flow-over-a-heated-plate/`
- `fluid-openfoam/`
- `run.sh`: describes how to execute the respective case
Expand Down