Skip to content

Commit

Permalink
ci: split workflows (#357)
Browse files Browse the repository at this point in the history
have dedicated workflow for
- generate the docs
- tests with java
- tests with php
- test with javascript

Signed-off-by: Jan Kowalleck <[email protected]>
  • Loading branch information
jkowalleck authored Dec 15, 2023
1 parent 853b7c7 commit 963e99b
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 26 deletions.
54 changes: 31 additions & 23 deletions .github/workflows/cibuild.yml → .github/workflows/build_docs.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI Build
name: Build Docs

on:
push:
Expand All @@ -10,43 +10,51 @@ env:
PYTHON_VERSION_DEFAULT: "3.10"

jobs:
build:
docs_xml:
runs-on: ubuntu-latest
defaults:
run:
working-directory: docgen/xml
steps:
- name: Checkout
# see https://github.com/actions/checkout
uses: actions/checkout@v4
- name: Set up JDK
# see https://github.com/actions/setup-java
uses: actions/setup-java@v4
with:
java-version: '8'
distribution: 'zulu'
java-package: jdk
- name: Build with Maven
run: mvn -B package --file pom.xml
working-directory: tools
- name: Setup Python Environment
# see https://github.com/actions/setup-python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION_DEFAULT }}
architecture: 'x64'
- name: Generate JSON Schema documentation
run: ./gen.sh
working-directory: docgen/json
- name: Generate XML Schema documentation
- name: Generate Schema documentation
run: ./gen.sh
working-directory: docgen/xml
- name: Archive JSON Schema documentation
- name: Archive Schema documentation
# https://github.com/actions/upload-artifact
uses: actions/upload-artifact@v3
with:
name: JSON-Schema-documentation
path: docgen/json/docs
- name: Archive XML Schema documentation
name: XML-Schema-documentation
path: docgen/xml/docs
if-no-files-found: error
docs_json:
runs-on: ubuntu-latest
defaults:
run:
working-directory: docgen/json
steps:
- name: Checkout
# see https://github.com/actions/checkout
uses: actions/checkout@v4
- name: Setup Python Environment
# see https://github.com/actions/setup-python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION_DEFAULT }}
architecture: 'x64'
- name: Generate Schema documentation
run: ./gen.sh
- name: Archive Schema documentation
# https://github.com/actions/upload-artifact
uses: actions/upload-artifact@v3
with:
name: XML-Schema-documentation
path: docgen/xml/docs
name: JSON-Schema-documentation
path: docgen/json/docs
if-no-files-found: error
32 changes: 32 additions & 0 deletions .github/workflows/test_java.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: CT Java

on:
push:
branches: ['master', 'main']
pull_request:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

defaults:
run:
working-directory: tools

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
# see https://github.com/actions/checkout
uses: actions/checkout@v4
- name: Set up JDK
# see https://github.com/actions/setup-java
uses: actions/setup-java@v4
with:
java-version: '8'
distribution: 'zulu'
java-package: jdk
- name: test with Maven
run: mvn clean test
3 changes: 1 addition & 2 deletions .github/workflows/js.yml → .github/workflows/test_js.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# docs: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions

name: JS CI
name: CT JavaScript

on:
push:
Expand All @@ -12,7 +12,6 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true


defaults:
run:
working-directory: tools/src/test/js
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/php.yml → .github/workflows/test_php.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
# docs: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions

name: PHP CI
name: CT PHP

on:
push:
branches: ['master', 'main']
pull_request:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

defaults:
run:
working-directory: tools/src/test/php
Expand Down

0 comments on commit 963e99b

Please sign in to comment.