Skip to content
This repository has been archived by the owner on Jun 27, 2024. It is now read-only.

Commit

Permalink
feat: First version (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
lholota committed May 20, 2020
1 parent 3d6669d commit 94e8377
Show file tree
Hide file tree
Showing 30 changed files with 1,038 additions and 11 deletions.
14 changes: 14 additions & 0 deletions .dependabot/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: 1
update_configs:
- package_manager: "github_actions"
directory: "/"
update_schedule: "daily"
commit_message:
prefix: "ci"
include_scope: true
- package_manager: "java:gradle"
directory: "/"
update_schedule: "daily"
commit_message:
prefix: "chore"
include_scope: true
11 changes: 11 additions & 0 deletions .github/semantic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
titleOnly: true
types:
- feat
- fix
- docs
- refactor
- test
- build
- ci
- chore
- revert
35 changes: 35 additions & 0 deletions .github/settings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# https://developer.github.com/v3/repos/#edit
repository:
name: docker-base
description: ""
homepage: https://homecentr.github.io/
private: false
has_issues: true
has_wiki: false
has_downloads: false
has_projects: false
archived: false

default_branch: master
allow_squash_merge: true
allow_merge_commit: false
allow_rebase_merge: false

# https://developer.github.com/v3/repos/branches/#update-branch-protection
branches:
- name: master
protection:
required_status_checks:
strict: true
contexts: [ "build (alpine)", "build (centos)", "Semantic Pull Request" ]
required_pull_request_reviews: null
enforce_admins: false
restrictions:

labels:
- name: bug
color: d73a4a
- name: feature
color: a2eeef
- name: question
color: d876e3
23 changes: 23 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: CI PR/Branch
on:
push:
branches-ignore:
- master
pull_request:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master

- name: Set up java for tests execution
uses: actions/setup-java@v1
with:
java-version: 11

- name: Gradle - build
run: gradle build

- name: Gradle - test
run: gradle test
39 changes: 39 additions & 0 deletions .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: CI/CD on master
on:
push:
branches:
- master

env:
BINTRAY_REPO: maven
BINTRAY_ORG: homecentr

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master

- name: Set up java for tests execution
uses: actions/setup-java@v1
with:
java-version: 11

- name: "Determine release version"
uses: codfish/semantic-release-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_URL: "https://api.github.com"

- name: Gradle - build
run: gradle build

- name: Gradle - test
run: gradle test

- name: Gradle - publish to bintray
if: env.RELEASE_VERSION != ''
run: gradle bintrayUpload
env:
BINTRAY_USER: ${{ secrets.BINTRAY_USER }}
BINTRAY_API_KEY: ${{ secrets.BINTRAY_API_KEY }}
56 changes: 45 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,23 +1,57 @@
# Compiled class file
# Java class files
*.class

# Log file
*.log

# BlueJ files
*.ctxt

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar

# virtual machine crash logs, see http:https://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

# generated files
bin/
gen/
build/
out/

# Eclipse project files
.classpath
.project
.settings/

# Proguard folder generated by Eclipse
proguard/

# Local configuration file (sdk path, etc)
local.properties

# Intellij project files
*.iml
*.ipr
*.iws
.idea/

#Gradle
.gradletasknamecache
.gradle/
gradle.properties

# Exceptions
!gradle/wrapper/*.jar

# Logs / Save Files
config/*
client.log

# JavaDoc
/docs/javadoc/*

# Example Code
/src/main/java/me/philippheuer/twitch4j/example/*

# Modules
/modules/
89 changes: 89 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
plugins{
id 'com.jfrog.bintray' version '1.8.4'
id 'java-library'
id 'idea'
id 'maven-publish'
id 'maven'
}

group = 'io.homecentr'

sourceCompatibility = 1.8

jar {
baseName = 'testcontainers-extensions'
}

repositories{
mavenCentral()
jcenter()
}

dependencies{
implementation "org.testcontainers:testcontainers:1.14.1"

testImplementation group: 'junit', name: 'junit', version: '4.13'

testCompile "org.mockito:mockito-core:3.3.3"
}

task sourcesJar(type: Jar, dependsOn: classes){
classifier = 'sources'
from sourceSets.main.allSource
}

task javadocJar(type: Jar, dependsOn: javadoc){
classifier = 'javadoc'
from javadoc.destinationDir
}

artifacts{
archives sourcesJar
archives javadocJar
}

bintray{
user = System.getenv("BINTRAY_USER")
key = System.getenv("BINTRAY_API_KEY")
publications = ['TestContainersExtensions']
publish = true

pkg{
repo = String.valueOf(System.getenv('BINTRAY_REPO')).toLowerCase()
userOrg = String.valueOf(System.getenv('BINTRAY_ORG')).toLowerCase()
name = 'testcontainers-extensions'
licenses = ['MIT']
vcsUrl = 'https://github.com/homecentr/testcontainers-extensions.git'
websiteUrl = 'https://github.com/homecentr/testcontainers-extensions'
issueTrackerUrl = 'https://github.com/homecentr/testcontainers-extensions/issues'
publicDownloadNumbers = true

githubRepo = 'homecentr/testcontainers-extensions'
githubReleaseNotesFile = 'README.md'

version {
name = String.valueOf(System.getenv("RELEASE_VERSION")).replace("v", "")
vcsTag = String.valueOf(System.getenv("GITHUB_SHA")).toLowerCase()
released = new Date()
}
}
}

publishing {
publications {
TestContainersExtensions(MavenPublication){
from components.java
groupId group
artifactId 'testcontainers-extensions'
version String.valueOf(System.getenv("RELEASE_VERSION")).replace("v", "")
artifact javadocJar
artifact sourcesJar
}
}
}

test {
afterTest { desc, result ->
logger.quiet "Executing test ${desc.name} [${desc.className}] with result: ${result.resultType}"
}
}
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 5 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\:https://services.gradle.org/distributions/gradle-4.8.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 94e8377

Please sign in to comment.