Skip to content

Commit

Permalink
Merge branch 'release/ALPHA'
Browse files Browse the repository at this point in the history
  • Loading branch information
BrendonButler committed Jul 27, 2023
2 parents e465dda + fec5971 commit 4cc065e
Show file tree
Hide file tree
Showing 53 changed files with 4,125 additions and 1,123 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Create Release

on:
workflow_dispatch:

jobs:
create-release:
name: Create Release
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Java
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'zulu'

- name: Get Previous tag
id: previoustag
uses: WyriHaximus/github-action-get-previous-tag@v1

- name: Build and package the shaded jar
run: mvn clean package shade:shade

- name: Upload shaded jar as a release artifact
uses: actions/upload-artifact@v3
with:
name: shaded-jar-artifact
path: target/shops-${{ steps.get-latest-tag.outputs.tag }}.jar
56 changes: 36 additions & 20 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,14 @@ name: CI Pipeline
on:
push:
branches:
- main
- develop
pull_request:
branches:
- main
- develop

jobs:
build:

build-and-test:
name: Build and Test
runs-on: ubuntu-latest

steps:
Expand All @@ -28,26 +26,44 @@ jobs:
- name: Build and run unit tests
run: mvn clean install

#- name: Generate code coverage report
# run: mvn jacoco:report
- name: Generate code coverage report
run: mvn jacoco:report

#- name: Add report to PR
# id: jacoco
# uses: madrapps/[email protected]
# with:
# paths: ${{ github.workspace }}/build/reports/jacoco/testCoverage/testCoverage.xml
# token: ${{ secrets.GITHUB_TOKEN }}
# min-coverage-overall: 40
# min-coverage-changed-files: 60
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

- name: Run static code analysis
run: mvn spotbugs:check
integration-tests:
name: Integration Tests
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Java
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'zulu'

- name: Run integration tests
run: mvn verify

- name: Check documentation
run: mvn validate site
documentation:
name: Documentation and Reports
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Java
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'zulu'

- name: Run security scans
run: mvn org.owasp:dependency-check-maven:check
- name: Check documentation and publish reports
run: mvn validate site
5 changes: 5 additions & 0 deletions .idea/jarRepositories.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
# Shops
[![CI Pipeline](https://github.com/MrSparkzz/Shops/actions/workflows/pipeline.yml/badge.svg)](https://github.com/MrSparkzz/Shops/actions/workflows/pipeline.yml)
![Codecov](https://img.shields.io/codecov/c/github/MrSparkzz/Shops?logo=codecov&logoColor=white&label=Coverage)

Shops plugin for Bukkit/Spigot 2022+ [Built for Spigot 1.18]

![Shops social image](https://repository-images.githubusercontent.com/388618586/0d033997-0fcd-44db-a53d-c635f8bc38f5)

**Depends on:** [Vault](https://github.com/MilkBowl/Vault)

**Requires economy plugin (compatible with Vault) such as:** [EssentialsX](https://github.com/EssentialsX/Essentials)
15 changes: 15 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
coverage:
status:
project:
default:
target: 70% # Set the default target to 60%
threshold: 40% # Set the threshold for the "yellow" range to 40%
base: auto
paths:
- "src/main/java"
range: 40..70 # Set the range to "40..70" for the "yellow" range
round: down
precision: 2
parsers:
jacoco:
partials_as_hits: true #false by default
Loading

0 comments on commit 4cc065e

Please sign in to comment.