Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Github workflows #18

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @conor10 @gtebrean @NickSneo
3 changes: 3 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# These are supported funding model platforms

github: [web3j]
35 changes: 35 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
name: Bug report
about: Create a report to help us improve
title: ""
labels: bug
assignees: ''

---

# _Bug_title_
_A clear and concise description of what the issue is._

## Steps To Reproduce
_Describe the exact steps or scenario to reproduce the issue._

### Expected behavior
_A clear and concise description of what you expected to happen._

### Actual behavior
_A description of the actual behavior occurring._

## Environment
_Describe the environment in which the issue occurs_
- Plugin version
- Java version
- Operating System


## Additional context
_Add any other context about the problem here._
- Logs
- Sample code and/or code snippets
- Unit/integration tests to highlight the issue


14 changes: 14 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: Feature report
about: Create a report to help us improve
title: ""
labels: enhancement
assignees: ''

---


## Feature description_
_A clear and concise description of what the feature would be._


21 changes: 21 additions & 0 deletions .github/ISSUE_TEMPLATE/issue_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: Issue report
about: Create a report to help us improve
title: ""
labels: needs-review
assignees: ''

---


# _Issue_title_
_A clear and concise description of what the issue is._


## _Issue_description_
_Please describe what are you trying to do and why it doesn't work_


## _Issue_context_
_Please provide additional information that might be helpful_

14 changes: 14 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
### What does this PR do?
*required*

### Where should the reviewer start?
*required*

### Why is it needed?
*required*

## Checklist

- [ ] I've read the contribution guidelines.
- [ ] I've added tests (if applicable).
- [ ] I've added a changelog entry if necessary.
24 changes: 24 additions & 0 deletions .github/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 21
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 7
# Issues with these labels will never be considered stale
exemptLabels:
- enhancement
- funded
- help wanted
- mini-project
- needs-review
- bug
- awaiting-pr
- downstream-issue
- wip
# Label to use when marking an issue as stale
staleLabel: stale
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false
31 changes: 31 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Build

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
- name: Cache Gradle packages
uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build
run: ./gradlew check jacocoTestReport
- name: After success
run: bash <(curl -s https://codecov.io/bash)
if: ${{ success() }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
.classpath
.project
.settings
.DS_Store

web3j.asc
stale_outputs_checked
2 changes: 1 addition & 1 deletion gradle/jacoco/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ task jacocoRootTestReport(type: org.gradle.testing.jacoco.tasks.JacocoReport) {
getClassDirectories().from(subprojects.sourceSets.main.output)
getExecutionData().from(subprojects.jacocoTestReport.executionData)
reports {
xml.enabled true
xml.required.set(true)
}

doFirst {
Expand Down
2 changes: 1 addition & 1 deletion gradle/junit/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ext {
junitVersion = '5.5.2'
junitVersion = '5.9.3'
}

dependencies {
Expand Down
1 change: 0 additions & 1 deletion gradle/repositories/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ repositories {
jcenter()
maven { url 'https://oss.sonatype.org/content/repositories/releases/' }
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
maven { url "https://artifacts.consensys.net/public/maven/maven/" }
}
30 changes: 24 additions & 6 deletions gradle/spotless/build.gradle
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@

apply plugin: 'com.diffplug.gradle.spotless'
apply plugin: 'com.diffplug.spotless'
apply plugin: "de.undercouch.download"

task downloadJavaLicense(type: Download) {
src 'https://raw.githubusercontent.com/web3j/build-tools/master/gradle/spotless/java.license'
src 'https://raw.githubusercontent.com/hyperledger/web3j-build-tools/main/gradle/spotless/java.license'
dest new File("$rootDir/gradle/spotless",'java.license')
quiet true
onlyIfModified true
}

task downloadFormatterProperties(type: Download) {
src 'https://raw.githubusercontent.com/web3j/build-tools/master/gradle/spotless/formatter.properties'
src 'https://raw.githubusercontent.com/hyperledger/web3j-build-tools/main/gradle/spotless/formatter.properties'
dest new File("$rootDir/gradle/spotless",'formatter.properties')
quiet true
onlyIfModified true
Expand All @@ -26,7 +26,7 @@ spotless {
exclude '**/build/install/**'
}
removeUnusedImports()
googleJavaFormat("1.7").aosp()
googleJavaFormat('1.17.0').aosp()
importOrder 'java', '', 'org.web3j', '\\#'
trimTrailingWhitespace()
endWithNewline()
Expand All @@ -39,7 +39,7 @@ spotless {
exclude '**/.gradle/**'
exclude '**/build/install/**'
}
ktlint('0.31.0')
ktlint('0.49.1')
trimTrailingWhitespace()
endWithNewline()
licenseHeaderFile "$rootDir/gradle/spotless/java.license"
Expand All @@ -52,4 +52,22 @@ spotless {
}
}

spotlessCheck.dependsOn('downloadJavaLicense', 'downloadFormatterProperties')
tasks.named('spotlessJava') {
dependsOn downloadJavaLicense, downloadFormatterProperties
mustRunAfter tasks.named('compileJava')
mustRunAfter tasks.named('spotlessGroovyGradle')
}

tasks.named('spotlessKotlin') {
dependsOn downloadJavaLicense, downloadFormatterProperties
mustRunAfter tasks.named('compileJava')
mustRunAfter tasks.named('spotlessGroovyGradle')
dependsOn tasks.named('spotlessJava')
}

tasks.named('spotlessCheck') {
dependsOn downloadJavaLicense, downloadFormatterProperties
dependsOn tasks.named('spotlessJava')
dependsOn tasks.named('spotlessKotlin')
dependsOn tasks.named('spotlessGroovyGradle')
}
Loading