From ea037ecda71409f78b66407c6b4d58c5d4302a75 Mon Sep 17 00:00:00 2001
From: Valentyn Kolesnikov <javadev75@gmail.com>
Date: Sun, 26 Mar 2023 16:30:13 +0300
Subject: [PATCH] Added github actions

---
 .github/workflows/gradle.yml | 27 +++++++++++++++++++++++++++
 README.md                    |  2 +-
 2 files changed, 28 insertions(+), 1 deletion(-)
 create mode 100644 .github/workflows/gradle.yml

diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml
new file mode 100644
index 0000000000..77c9e18a22
--- /dev/null
+++ b/.github/workflows/gradle.yml
@@ -0,0 +1,27 @@
+name: Java CI
+
+on:
+  push:
+    branches: [ master ]
+  pull_request:
+    branches: [ master ]
+
+permissions: read-all
+jobs:
+  build-linux:
+    name: build-linux
+
+    runs-on: ubuntu-latest
+
+    steps:
+    - uses: actions/checkout@v3
+      with:
+        fetch-depth: 0
+    - name: Set up JDK 11
+      uses: actions/setup-java@v3
+      with:
+        distribution: 'temurin'
+        java-version: '11'
+        cache: 'gradle'
+    - name: Build with Gradle
+      run: chmod +x gradlew && ./gradlew build -x checkstyleMain
diff --git a/README.md b/README.md
index 18fae90c6b..7db5cdec7d 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-# [LeetCode](https://leetcode.com/problemset/algorithms/) [![License](https://img.shields.io/badge/license-Apache_2.0-blue.svg)](LICENSE.md) [![Build Status](https://travis-ci.org/fishercoder1534/Leetcode.svg?branch=master)](https://travis-ci.org/fishercoder1534/Leetcode) ![Language](https://img.shields.io/badge/language-Java%20%2F%20MySQL%20%2F%20Bash-blue.svg) 
+# [LeetCode](https://leetcode.com/problemset/algorithms/) [![License](https://img.shields.io/badge/license-Apache_2.0-blue.svg)](LICENSE.md) [![Java CI](https://github.com/fishercoder1534/Leetcode/actions/workflows/gradle.yml/badge.svg)](https://github.com/fishercoder1534/Leetcode/actions/workflows/gradle.yml) ![Language](https://img.shields.io/badge/language-Java%20%2F%20MySQL%20%2F%20Bash-blue.svg) 
 
 _If you like this project, please leave me a star._ &#9733;