Skip to content

Commit

Permalink
add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
shinyano committed May 11, 2024
1 parent 9dce29a commit df9dd3c
Show file tree
Hide file tree
Showing 3 changed files with 107 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/format-checker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Format

on: [pull_request]

jobs:
formatting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3 # v2 minimum required
- name: Check format with Maven
shell: bash
run: |
mvn clean spotless:check
20 changes: 20 additions & 0 deletions .github/workflows/lint-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: "Lint PR"

on:
pull_request:
types:
- opened
- edited
- synchronize

permissions:
pull-requests: read

jobs:
main:
name: Validate PR title
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
74 changes: 74 additions & 0 deletions .github/workflows/upload-binaries.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: Upload Binaries to Github

on:
release:
types: [published]

jobs:
upload-package:
name: Upload to Github Release
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: "8"
distribution: "temurin"
cache: "maven"
- name: package
run: |
mvn package \
--batch-mode \
-P release,!format \
-DskipTests=true
- name: upload
uses: svenstaro/upload-release-action@v2
with:
file: "**/*.tar.gz"
file_glob: true
overwrite: true
upload-deploy:
name: Upload to Github Pages
runs-on: ubuntu-latest
permissions:
pull-requests: write
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: "8"
distribution: "temurin"
cache: "maven"
- name: checkout pages branch
uses: actions/checkout@v4
with:
path: pages
ref: pages
fetch-depth: 0
- name: deploy
run: |
mvn deploy \
--batch-mode \
-P !format \
-DskipTests=true \
-Ddeploy.repo.dir=$(pwd)/pages
- name: sync README.md and docs
run: |
cp README.md pages/
cp -r docs pages/
- name: create pull request
uses: peter-evans/create-pull-request@v6
with:
path: pages
add-paths: |
maven-repo
maven-snapshot-repo
README.md
docs
branch: release-bot/pages
delete-branch: true
commit-message: "chore(repo): update maven repository"
title: "chore(repo): update maven repository"

0 comments on commit df9dd3c

Please sign in to comment.