Skip to content

Commit 963e99b

Browse files
authored
ci: split workflows (#357)
have dedicated workflow for - generate the docs - tests with java - tests with php - test with javascript Signed-off-by: Jan Kowalleck <[email protected]>
1 parent 853b7c7 commit 963e99b

File tree

4 files changed

+69
-26
lines changed

4 files changed

+69
-26
lines changed
Lines changed: 31 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: CI Build
1+
name: Build Docs
22

33
on:
44
push:
@@ -10,43 +10,51 @@ env:
1010
PYTHON_VERSION_DEFAULT: "3.10"
1111

1212
jobs:
13-
build:
13+
docs_xml:
1414
runs-on: ubuntu-latest
15+
defaults:
16+
run:
17+
working-directory: docgen/xml
1518
steps:
1619
- name: Checkout
1720
# see https://github.com/actions/checkout
1821
uses: actions/checkout@v4
19-
- name: Set up JDK
20-
# see https://github.com/actions/setup-java
21-
uses: actions/setup-java@v4
22-
with:
23-
java-version: '8'
24-
distribution: 'zulu'
25-
java-package: jdk
26-
- name: Build with Maven
27-
run: mvn -B package --file pom.xml
28-
working-directory: tools
2922
- name: Setup Python Environment
3023
# see https://github.com/actions/setup-python
3124
uses: actions/setup-python@v5
3225
with:
3326
python-version: ${{ env.PYTHON_VERSION_DEFAULT }}
3427
architecture: 'x64'
35-
- name: Generate JSON Schema documentation
36-
run: ./gen.sh
37-
working-directory: docgen/json
38-
- name: Generate XML Schema documentation
28+
- name: Generate Schema documentation
3929
run: ./gen.sh
40-
working-directory: docgen/xml
41-
- name: Archive JSON Schema documentation
30+
- name: Archive Schema documentation
4231
# https://github.com/actions/upload-artifact
4332
uses: actions/upload-artifact@v3
4433
with:
45-
name: JSON-Schema-documentation
46-
path: docgen/json/docs
47-
- name: Archive XML Schema documentation
34+
name: XML-Schema-documentation
35+
path: docgen/xml/docs
36+
if-no-files-found: error
37+
docs_json:
38+
runs-on: ubuntu-latest
39+
defaults:
40+
run:
41+
working-directory: docgen/json
42+
steps:
43+
- name: Checkout
44+
# see https://github.com/actions/checkout
45+
uses: actions/checkout@v4
46+
- name: Setup Python Environment
47+
# see https://github.com/actions/setup-python
48+
uses: actions/setup-python@v5
49+
with:
50+
python-version: ${{ env.PYTHON_VERSION_DEFAULT }}
51+
architecture: 'x64'
52+
- name: Generate Schema documentation
53+
run: ./gen.sh
54+
- name: Archive Schema documentation
4855
# https://github.com/actions/upload-artifact
4956
uses: actions/upload-artifact@v3
5057
with:
51-
name: XML-Schema-documentation
52-
path: docgen/xml/docs
58+
name: JSON-Schema-documentation
59+
path: docgen/json/docs
60+
if-no-files-found: error

.github/workflows/test_java.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: CT Java
2+
3+
on:
4+
push:
5+
branches: ['master', 'main']
6+
pull_request:
7+
workflow_dispatch:
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
defaults:
14+
run:
15+
working-directory: tools
16+
17+
jobs:
18+
test:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout
22+
# see https://github.com/actions/checkout
23+
uses: actions/checkout@v4
24+
- name: Set up JDK
25+
# see https://github.com/actions/setup-java
26+
uses: actions/setup-java@v4
27+
with:
28+
java-version: '8'
29+
distribution: 'zulu'
30+
java-package: jdk
31+
- name: test with Maven
32+
run: mvn clean test

.github/workflows/js.yml renamed to .github/workflows/test_js.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# docs: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions
22

3-
name: JS CI
3+
name: CT JavaScript
44

55
on:
66
push:
@@ -12,7 +12,6 @@ concurrency:
1212
group: ${{ github.workflow }}-${{ github.ref }}
1313
cancel-in-progress: true
1414

15-
1615
defaults:
1716
run:
1817
working-directory: tools/src/test/js

.github/workflows/php.yml renamed to .github/workflows/test_php.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
# docs: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions
22

3-
name: PHP CI
3+
name: CT PHP
44

55
on:
66
push:
77
branches: ['master', 'main']
88
pull_request:
99
workflow_dispatch:
1010

11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
cancel-in-progress: true
14+
1115
defaults:
1216
run:
1317
working-directory: tools/src/test/php

0 commit comments

Comments
 (0)