mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-12-19 07:00:35 +08:00
Resolve build errors & cleanup structure (#2334)
This commit is contained in:
8
.github/ISSUE_TEMPLATE/bug_report.md
vendored
8
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@@ -1,10 +1,9 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
title: ""
|
||||
labels: ""
|
||||
assignees: ""
|
||||
---
|
||||
|
||||
**Describe the bug**
|
||||
@@ -12,6 +11,7 @@ A clear and concise description of what the bug is.
|
||||
|
||||
**To Reproduce**
|
||||
Steps to reproduce the behavior:
|
||||
|
||||
1. Go to '...'
|
||||
2. Click on '....'
|
||||
3. Scroll down to '....'
|
||||
|
||||
7
.github/ISSUE_TEMPLATE/feature_request.md
vendored
7
.github/ISSUE_TEMPLATE/feature_request.md
vendored
@@ -1,10 +1,9 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for this project
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
title: ""
|
||||
labels: ""
|
||||
assignees: ""
|
||||
---
|
||||
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
|
||||
14
.github/workflows/build.yml
vendored
14
.github/workflows/build.yml
vendored
@@ -1,20 +1,14 @@
|
||||
name: Build Project
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
name: Build
|
||||
on: push
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-python@v2
|
||||
- name: Set up JDK 12
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 12
|
||||
java-version: 17
|
||||
- run: find . -type f -name "*.java" > sources.txt
|
||||
- run: javac @sources.txt
|
||||
29
.github/workflows/checkstyle.yml
vendored
29
.github/workflows/checkstyle.yml
vendored
@@ -1,29 +0,0 @@
|
||||
name: Code Formatter
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master, Development]
|
||||
paths:
|
||||
- "**.java"
|
||||
|
||||
jobs:
|
||||
format:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
|
||||
- name: Set up JDK 12
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 12
|
||||
- run: wget https://github.com/google/google-java-format/releases/download/google-java-format-1.9/google-java-format-1.9-all-deps.jar -O formatter.jar
|
||||
- run: java -jar formatter.jar --replace --set-exit-if-changed $(find . -type f -name "*.java")
|
||||
- name: Commit Format changes
|
||||
if: failure()
|
||||
run: |
|
||||
git diff
|
||||
git config --global user.name github-actions
|
||||
git config --global user.email '${GITHUB_ACTOR}@users.noreply.github.com'
|
||||
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
|
||||
git commit -am "Formatted with Google Java Formatter" || true
|
||||
git push --force origin HEAD:$GITHUB_REF || true
|
||||
@@ -1,16 +1,8 @@
|
||||
name: Prettier
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- Development
|
||||
|
||||
name: Prettify
|
||||
on: push
|
||||
jobs:
|
||||
prettier:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
@@ -20,7 +12,7 @@ jobs:
|
||||
- name: Prettify code
|
||||
uses: creyD/prettier_action@v3.3
|
||||
with:
|
||||
prettier_options: --write **/*.{java}
|
||||
commit_message: 'style: prettify code'
|
||||
prettier_options: --write **/*.java
|
||||
commit_message: 'Prettify code'
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
3
.github/workflows/stale.yml
vendored
3
.github/workflows/stale.yml
vendored
@@ -1,7 +1,7 @@
|
||||
name: 'Close stale issues and PRs'
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 */10 * * *'
|
||||
- cron: '0 0 * * *'
|
||||
jobs:
|
||||
stale:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -16,4 +16,3 @@ jobs:
|
||||
exempt-pr-labels: 'dont-close'
|
||||
days-before-stale: 30
|
||||
days-before-close: 7
|
||||
operations-per-run: 150
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
# This GitHub Action updates the DIRECTORY.md file (if needed) when doing a git push
|
||||
name: update_directory_md
|
||||
on: [push]
|
||||
name: Update Directory
|
||||
on: push
|
||||
jobs:
|
||||
update_directory_md:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
- uses: actions/setup-python@master
|
||||
- name: update_directory_md
|
||||
- name: Update Directory
|
||||
shell: python
|
||||
run: |
|
||||
import os
|
||||
@@ -63,5 +63,5 @@ jobs:
|
||||
git config --global user.email '${GITHUB_ACTOR}@users.noreply.github.com'
|
||||
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
|
||||
git add DIRECTORY.md
|
||||
git commit -am "updating DIRECTORY.md" || true
|
||||
git commit -am "Update directory" || true
|
||||
git push --force origin HEAD:$GITHUB_REF || true
|
||||
Reference in New Issue
Block a user