Skip to content

Commit

Permalink
#1049 Set up singular pull request CI workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
GuusLieben committed Aug 10, 2024
1 parent 96e427b commit 3ac50b2
Show file tree
Hide file tree
Showing 8 changed files with 51 additions and 15 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/build.docs.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Build documentation

on: [pull_request, workflow_dispatch]
on: workflow_call

jobs:
buildDocs:
Expand All @@ -13,12 +13,14 @@ jobs:
with:
java-version: 21
distribution: temurin
- name: Build documentation
- name: Build developer documentation
run: mvn clean antora:antora -P ci -Dantora.skip=false -Dantora.playbook=playbook-local.yml
- name: Build Javadocs
run: mvn javadoc:aggregate -P ci -Djavadoc.skip=false
- name: Archive documentation artifacts
uses: actions/upload-artifact@v4
with:
name: Documentation archive
path: target/site
if-no-files-found: error
retention-days: 7
retention-days: 7
4 changes: 2 additions & 2 deletions .github/workflows/build.modules.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Build all
name: Build modules

on: [pull_request, workflow_dispatch]
on: workflow_call

jobs:
buildSource:
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/check.codestyle.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
name: Checkstyle
name: Check code style

on: [pull_request, workflow_dispatch]
on: workflow_call

jobs:
depCheck:
name: Checkstyle
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/check.dependency.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
name: OWASP Dependency Check
name: check_dependency

on: [pull_request, workflow_dispatch]
on: workflow_call

jobs:
depCheck:
name: OWASP Dependency Check
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/check.license.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
name: License header check
name: check_license

on: [pull_request, workflow_dispatch]
on: workflow_call

jobs:
depCheck:
name: License header check
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.coverage.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Tests

on: [pull_request, workflow_dispatch]
on: workflow_call

jobs:
coverage:
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/workflow.pull_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Pull request CI
on: [pull_request]

jobs:
pre_build:
name: Pre-build checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Check code style
uses: ./.github/workflows/check.codestyle.yml
- name: License header check
uses: ./.github/workflows/check.license.yml
- name: OWASP Dependency Check
uses: ./.github/workflows/check.dependency.yml
build:
name: Build modules
needs: pre_build
runs-on: ubuntu-latest
steps:
- name: Build modules
uses: ./.github/workflows/build.modules.yml
test:
name: Tests
needs: build
runs-on: ubuntu-latest
steps:
- name: Tests
uses: ./.github/workflows/test.coverage.yml
post_build:
name: Documentation
needs: test
runs-on: ubuntu-latest
steps:
- name: Build documentation
uses: ./.github/workflows/build.docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import org.dockbox.hartshorn.inject.InjectorEnvironment;
import org.dockbox.hartshorn.inject.component.ComponentRegistry;
import org.dockbox.hartshorn.launchpad.ApplicationContext;
import org.dockbox.hartshorn.launchpad.HartshornApplication;
import org.dockbox.hartshorn.launchpad.context.ApplicationContextCarrier;

/**
Expand Down

0 comments on commit 3ac50b2

Please sign in to comment.