Skip to content
Open

dd #34

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
89 changes: 89 additions & 0 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
#
#name: Java CI with Maven
#
#on:
# push:
# branches: [ "master" ]
# pull_request:
# branches: [ "master" ]
#
#jobs:
# build:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - name: Set up JDK 17
# uses: actions/setup-java@v4
# with:
# java-version: '17'
# distribution: 'temurin'
# cache: maven
#


# Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive



name: Maven CI/CD

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build_and_test:
runs-on: ubuntu-latest

services:
redis:
image: redis
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 6379:6379

steps:
- uses: actions/checkout@v2
- name: Set up JDK 14
uses: actions/setup-java@v1
with:
java-version: 14

- name: Cache the Maven packages to speed up build
uses: actions/cache@v1
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2

- name: Build and test project with Maven
run: mvn -B package --file pom.xml


publish-job:
runs-on: ubuntu-latest
needs: [build_and_test]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: 14
- run: mvn -B package --file pom.xml -DskipTests
- run: mkdir staging && cp target/*jar-with-dependencies.jar staging
- uses: actions/upload-artifact@v4
with:
name: Package
path: staging
3 changes: 3 additions & 0 deletions .idea/.gitignore

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

13 changes: 13 additions & 0 deletions .idea/compiler.xml

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

7 changes: 7 additions & 0 deletions .idea/encodings.xml

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

20 changes: 20 additions & 0 deletions .idea/jarRepositories.xml

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

12 changes: 12 additions & 0 deletions .idea/misc.xml

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

6 changes: 6 additions & 0 deletions .idea/vcs.xml

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

3 changes: 2 additions & 1 deletion src/main/java/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ public static void main( String[] args )
DeepThought ourSuperComputer = new DeepThought();
int ans = ourSuperComputer.answer_to_the_ultimate_question_of_life_the_universe_and_everything();
System.out.println(ans);
//
}
}
}
2 changes: 1 addition & 1 deletion src/main/java/DeepThought.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ private void calculate(){
}
System.out.println("7.5 million years have now passed and I have a answer");
}

//comment
private void think(int time){
try {
TimeUnit.SECONDS.sleep(time);
Expand Down
Binary file added target/classes/App.class
Binary file not shown.
Binary file added target/classes/DeepThought.class
Binary file not shown.