Skip to content

Commit

Permalink
Added github workflow actions for building and linting (#5)
Browse files Browse the repository at this point in the history
Signed-off-by: Kossi Efu <[email protected]>
  • Loading branch information
kossiefu authored Feb 25, 2022
1 parent 1fb7bb7 commit cbf4803
Show file tree
Hide file tree
Showing 3 changed files with 92 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/maven-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# 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://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven

name: Run build with Maven

on:
push:
branches: [ main ]

jobs:

build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'temurin'
cache: maven
- name: Build with Maven
run: mvn -B --update-snapshots -Pprod verify --file pom.xml
24 changes: 24 additions & 0 deletions .github/workflows/maven-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# 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://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven

name: Run unit tests with Maven

on:
pull_request:
branches: [ main ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'temurin'
cache: maven
- name: Run unit tests with Maven
run: mvn -B test --file pom.xml
43 changes: 43 additions & 0 deletions .github/workflows/super-linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# This workflow executes several linters on changed files based on languages used in your code base whenever
# you push a code or open a pull request.
#
# You can adjust the behavior by modifying this file.
# For more information, see:
# https://github.com/github/super-linter
name: Lint Code Base

on:
pull_request:
branches: [ main ]

jobs:
run-lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
# Full git history is needed to get a proper list of changed files within `super-linter`
fetch-depth: 0

- name: Lint Code Base
uses: github/super-linter@v4
env:
VALIDATE_ALL_CODEBASE: false
DEFAULT_BRANCH: main
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VALIDATE_BASH: false
#VALIDATE_BASH_EXEC: false
VALIDATE_DOCKERFILE_HADOLINT: false
VALIDATE_ENV: false
VALIDATE_GITHUB_ACTIONS: false
VALIDATE_JAVA: false
VALIDATE_JSCPD: false
VALIDATE_KUBERNETES_KUBEVAL: false
VALIDATE_MARKDOWN: false
VALIDATE_NATURAL_LANGUAGE: false
VALIDATE_PYTHON_BLACK: false
VALIDATE_PYTHON_FLAKE8: false
VALIDATE_PYTHON_ISORT: false
VALIDATE_XML: false
VALIDATE_YAML: false

0 comments on commit cbf4803

Please sign in to comment.