Skip to content

Commit

Permalink
add lint and testing workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ndiritumichael committed Sep 17, 2024
1 parent 13d6201 commit a467dfd
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 0 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/run-lint-and-tests-and-generate-artifact.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Workflow to perform checks for linting and unit tests, on PR into the main branch
name: Run Checks

# Sets the workflow to be triggered on pull-request specifically to main branch
on:
pull_request:
branches: [ "main","dev" ]

jobs:
# Job that runs ktlint and detekt lint checks
run-lint-checks:
name: Lint Checks
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '17'

- name: Make gradlew executable
run: chmod +x ./gradlew



- name: Run lint checks
run: ./gradlew codeLinting

# Job that runs unit tests
run-unit-tests:
name: Unit Tests
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '17'

- name: Make gradlew executable
run: chmod +x ./gradlew



- name: Run Unit Tests
run: ./gradlew testDebugUnitTest
6 changes: 6 additions & 0 deletions .idea/studiobot.xml

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

0 comments on commit a467dfd

Please sign in to comment.