Skip to content

Commit

Permalink
ci: test
Browse files Browse the repository at this point in the history
  • Loading branch information
benny123tw committed Jun 13, 2024
1 parent 13e4797 commit bef3334
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 44 deletions.
102 changes: 59 additions & 43 deletions .github/workflows/1.pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,54 +23,16 @@ on:
jobs:

build:
permissions:
contents: read
checks: write
id-token: write
name: Build + unit tests
uses: ./.github/workflows/callable.build.yml
if: | # avoid unnecessary pipeline runs during artifact release process ('gradle release plugin')
!contains(github.event.head_commit.message, '[Gradle Release Plugin] - pre tag commit')
|| github.ref_type == 'tag'
code_analysis:
name: Code Analysis (multi)
permissions:
actions: read
contents: read
security-events: write
uses: ./.github/workflows/callable.code-analysis.yml
needs: build
if: |
github.event_name != 'workflow_dispatch'
|| inputs.type == '...no release'
# integration_test:
# name: Integration tests
# uses: ./.github/workflows/callable.integration-test.yml
# needs: build

# gradle_release:
# name: Create release
# uses: ./.github/workflows/callable.gradle-release.yml
# secrets: inherit
# with:
# type: ${{ inputs.type }}
# needs: build
# if: |
# github.event_name == 'workflow_dispatch'
# && inputs.type != '...no release'

publish_sonatype:
name: Publish artifact (Maven Central)
uses: ./.github/workflows/callable.publish-central-portal.yml
secrets: inherit
needs: build
if: |
(
github.event_name != 'workflow_dispatch'
|| inputs.type == '...no release'
) && (
github.ref == 'refs/heads/main'
|| github.ref_type == 'tag'
)
publish_javadoc:
name: Publish javadoc (GitHub Pages)
permissions:
Expand All @@ -81,4 +43,58 @@ jobs:
(
github.ref == 'refs/heads/main'
&& ( inputs.type == '' || inputs.type == '...no release' )
) || github.ref_type == 'tag'
) || github.ref_type == 'tag'
#
# code_analysis:
# name: Code Analysis (multi)
# permissions:
# actions: read
# contents: read
# security-events: write
# uses: ./.github/workflows/callable.code-analysis.yml
# needs: build
# if: |
# github.event_name != 'workflow_dispatch'
# || inputs.type == '...no release'
#
# # integration_test:
# # name: Integration tests
# # uses: ./.github/workflows/callable.integration-test.yml
# # needs: build
#
# # gradle_release:
# # name: Create release
# # uses: ./.github/workflows/callable.gradle-release.yml
# # secrets: inherit
# # with:
# # type: ${{ inputs.type }}
# # needs: build
# # if: |
# # github.event_name == 'workflow_dispatch'
# # && inputs.type != '...no release'
#
# publish_sonatype:
# name: Publish artifact (Maven Central)
# uses: ./.github/workflows/callable.publish-central-portal.yml
# secrets: inherit
# needs: build
# if: |
# (
# github.event_name != 'workflow_dispatch'
# || inputs.type == '...no release'
# ) && (
# github.ref == 'refs/heads/main'
# || github.ref_type == 'tag'
# )
#
# publish_javadoc:
# name: Publish javadoc (GitHub Pages)
# permissions:
# contents: write
# uses: ./.github/workflows/callable.publish-javadoc.yml
# needs: build
# if: |
# (
# github.ref == 'refs/heads/main'
# && ( inputs.type == '' || inputs.type == '...no release' )
# ) || github.ref_type == 'tag'
2 changes: 1 addition & 1 deletion .github/workflows/callable.publish-javadoc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
env:
LIBRARY_NAME: ${{ env.LIBRARY_NAME }}
run: |
cd "$LIBRARY_NAME/build/docs/javadoc"
cd "vite-spring-webmvc/build/docs/javadoc"
zip -r ../../../../javadoc.zip .
- name: Upload artifact
Expand Down

0 comments on commit bef3334

Please sign in to comment.