Skip to content

Commit 26bea0c

Browse files
committed
Update automation material for wt2526
1 parent 070dbab commit 26bea0c

5 files changed

Lines changed: 36 additions & 26 deletions

File tree

05_testing_and_ci/automation_exercise.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
In this exercise, we create automated workflows and pipelines based on GitHub Actions. We are again working with our beloved diffusion Python code.
44

5-
Deadline: **Wednesday, January 29th, 2025, 09:00**
5+
Deadline: **Wednesday, January 28th, 2025, 09:00**
66

77
## Preparations
88

9-
Import the [automation exercise repository](https://github.com/Simulation-Software-Engineering/automation-exercise-wt2425) in your own account/namespace on GitHub and name it `automation-exercise`. It is also easier to add badges (see below) to the `README.md` if the repository is under your control.
9+
Import (not fork) the [automation exercise repository](https://github.com/Simulation-Software-Engineering/automation-exercise) in your own account/namespace on GitHub.
1010

11-
**Note**: We cannot work with forks here because GitHub Actions may not work in pull requests without explicit approval of the owner of the target repository
11+
**Note**: We cannot work with forks here because GitHub Actions may not work in pull requests without explicit approval of the owner of the target repository. It is also easier to add badges (see below) to the `README.md` if the repository is under your control.
1212

1313
## Task descriptions
1414

@@ -26,7 +26,7 @@ Once the workflow runs successfully, add a [GitHub workflow status badge](https:
2626

2727
## Submission
2828

29-
- Submit your solution via an issue in the *upstream* [automation exercise repository](https://github.com/Simulation-Software-Engineering/automation-exercise-wt2425). The issue should be named `[USERNAME] Automation exercise`, e.g., `[uekermbn] Automation exercise`. Please use your GitLab username here. Add a link to your GitHub repository in the issue. If necessary, add further explanations in the issue description.
29+
- Submit your solution via an issue in the *upstream* [automation exercise repository](https://github.com/Simulation-Software-Engineering/automation-exercise). The issue should be named `[USERNAME] Automation exercise`, e.g., `[uekermbn] Automation exercise`. Please use your GitLab username here. Add a link to your GitHub repository in the issue. If necessary, add further explanations in the issue description.
3030

3131
## Bonus: GitLab CI/CD
3232

05_testing_and_ci/automation_slides.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,11 @@ slideOptions:
9999

100100
- [GitHub Actions](https://github.com/features/actions)
101101
- [GitLab CI/CD](https://docs.gitlab.com/ee/ci/)
102+
- [Jenkins](https://www.jenkins.io/)
103+
- [Woodpecker CI](https://woodpecker-ci.org/)
104+
(e.g., in [Codeberg](https://docs.codeberg.org/ci/))
102105
- [Circle CI](https://circleci.com/)
103106
- [Travis CI](https://www.travis-ci.com/)
104-
- [Jenkins](https://www.jenkins.io/)
105107
- ...
106108

107109
---

05_testing_and_ci/github_actions_demo.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## 1. Setting up a Test Job
44

5-
- Clone [automation lecture repository](https://github.com/Simulation-Software-Engineering/automation-lecture-wt2425) and run code and tests
5+
- Clone [automation lecture repository](https://github.com/Simulation-Software-Engineering/automation-lecture) and run code and tests
66
- Set up workflow file
77

88
```bash
@@ -23,10 +23,10 @@
2323
test:
2424
runs-on: ubuntu-latest
2525
steps:
26-
- uses: actions/checkout@v2
27-
- uses: actions/setup-python@v2
26+
- uses: actions/checkout@v6
27+
- uses: actions/setup-python@v6
2828
with:
29-
python-version: '3.8'
29+
python-version: '3.10'
3030
- name: "Run unittest"
3131
run: python -m unittest
3232
```
@@ -70,10 +70,10 @@
7070
style:
7171
runs-on: ubuntu-latest
7272
steps:
73-
- uses: actions/checkout@v2
74-
- uses: actions/setup-python@v2
73+
- uses: actions/checkout@v6
74+
- uses: actions/setup-python@v6
7575
with:
76-
python-version: '3.8'
76+
python-version: '3.10'
7777
- name: "Install style checker"
7878
run: pip install black
7979
- name: "Run style check"
@@ -87,20 +87,20 @@
8787
- name: "Run build phase"
8888
run: echo "Building project $PROJECT_NAME"
8989
test:
90-
needs: build
90+
# needs: build
9191
runs-on: ubuntu-latest
9292
steps:
93-
- uses: actions/checkout@v2
94-
- uses: actions/setup-python@v2
93+
- uses: actions/checkout@v6
94+
- uses: actions/setup-python@v6
9595
with:
96-
python-version: '3.8'
96+
python-version: '3.10'
9797
- name: "Run unittest"
9898
run: python -m unittest
9999
```
100100

101-
- We need to run `actions/checkout@v2` in each job
101+
- We need to run `actions/checkout` in each job
102102
- We could share the repository between jobs via artifacts, but that is uncommon.
103-
- We need to run `actions/setup-python@v2` since jobs do not share the environment.
103+
- We need to run `actions/setup-python` since jobs do not share the environment.
104104
- We specify dependencies by `needs` such that the steps run after each other.
105105
- We do not have a real build step since it is Python. However, this might be interesting for compiled code.
106106

05_testing_and_ci/gitlab_ci_slides.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ From: [https://docs.gitlab.com/ee/ci/](https://docs.gitlab.com/ee/ci/)
6666

6767
## Components (2/2)
6868

69-
<img src="https://docs.gitlab.com/ee/ci/pipelines/img/manual_pipeline_v14_2.png" width=95%; style="margin-left:auto; margin-right:auto; padding-top: 25px; padding-bottom: 25px; background: #eeeeee">
69+
<img src="https://docs.gitlab.com/ci/pipelines/img/manual_job_v17_9.png" width=95%; style="margin-left:auto; margin-right:auto; padding-top: 25px; padding-bottom: 25px; background: #eeeeee">
7070

7171
From [GitLab CI/CD tutorial](https://docs.gitlab.com/ee/ci/pipelines/index.html)
7272

@@ -110,11 +110,11 @@ deploy job:
110110
111111
```yaml
112112
variables:
113-
TEST_VAR: "All jobs can use this variable's value"
113+
TEST_VAR: "All jobs can use this variable"
114114

115115
job1:
116116
variables:
117-
TEST_VAR_JOB: "Only job1 can use this variable's value"
117+
TEST_VAR_JOB: "Only job1 can use this variable"
118118
script:
119119
- echo "$TEST_VAR" and "$TEST_VAR_JOB"
120120
```
@@ -182,16 +182,14 @@ deploy job:
182182
183183
## Demo: GitLab Runner
184184
185-
- Installation of a GitLab Runner on a [bwCloud](https://www.bw-cloud.org/) VM (via Docker)
185+
- Installation of a GitLab Runner on a [bwCloud](https://portal.bw-cloud.org/) VM (via Docker)
186186
- Registration of the runner to a repository (Docker as executor)
187187
188188
---
189189
190190
## Advanced Topics
191191
192-
- Complex pipelines, e.g.,
193-
- [Directed Acyclic Graph](https://docs.gitlab.com/ee/ci/directed_acyclic_graph/)
194-
- [Multi-project pipelines](https://docs.gitlab.com/ee/ci/pipelines/downstream_pipelines.html#multi-project-pipelines)
192+
- [Multi-project pipelines](https://docs.gitlab.com/ee/ci/pipelines/downstream_pipelines.html#multi-project-pipelines)
195193
- [Anchors](https://docs.gitlab.com/ee/ci/yaml/yaml_optimization.html#anchors)
196194
- [ChatOps](https://docs.gitlab.com/ee/ci/chatops/)
197195
- [Extended testing](https://docs.gitlab.com/ee/ci/testing/unit_test_reports.html)

timetable.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,16 @@
118118
- **20** min.: Introduction to Testing: [slides](https://github.com/Simulation-Software-Engineering/Lecture-Material/blob/main/05_testing_and_ci/intro_slides.md)
119119
- **70** min.: Testing Python Code: [slides](https://github.com/Simulation-Software-Engineering/Lecture-Material/blob/main/05_testing_and_ci/python_testing_slides.md), [demo](https://github.com/Simulation-Software-Engineering/Lecture-Material/blob/main/05_testing_and_ci/python_testing_demo.md)
120120

121-
## 12.2 – Wed, January 14, 2025
121+
## 12.2 – Wed, January 14, 2026
122122

123123
- **90** min.: [Exercise: Testing Python Code](https://github.com/Simulation-Software-Engineering/Lecture-Material/blob/main/05_testing_and_ci/python_testing_exercise.md)
124+
125+
## 12.1 – Wed, January 21, 2026
126+
127+
- **15** min.: [Automation](https://github.com/Simulation-Software-Engineering/Lecture-Material/blob/main/05_testing_and_ci/automation_slides.md)
128+
- **45** min.: GitHub Actions: [slides](https://github.com/Simulation-Software-Engineering/Lecture-Material/blob/main/05_testing_and_ci/github_actions_slides.md), [demo](https://github.com/Simulation-Software-Engineering/Lecture-Material/blob/main/05_testing_and_ci/github_actions_demo.md)
129+
- **30** min.: GitLab CI: [slides](https://github.com/Simulation-Software-Engineering/Lecture-Material/blob/main/05_testing_and_ci/gitlab_ci_slides.md), [demo](https://github.com/Simulation-Software-Engineering/Lecture-Material/blob/main/05_testing_and_ci/gitlab_ci_demo.md)
130+
131+
## 12.2 – Wed, January 21, 2026
132+
133+
- **90** min.: [Exercise: Automating Workflows with GitHub Actions](https://github.com/Simulation-Software-Engineering/Lecture-Material/blob/main/05_testing_and_ci/automation_exercise.md)

0 commit comments

Comments
 (0)