Added CreateForm class #60
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Java CI with LOC Counting | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
# Checkout the code | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
# Cache Maven dependencies | |
- name: Cache Maven dependencies | |
uses: actions/cache@v2 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-${{ hashFiles('**/*.java') }} | |
restore-keys: | | |
${{ runner.os }}-maven- | |
# Build with Maven (check for compilation errors) | |
- name: Build with Maven | |
run: mvn clean install | |
# Run Checkstyle (static code analysis) | |
- name: Run Checkstyle | |
run: mvn checkstyle:check | |
# Count Lines of Code using cloc | |
- name: Count Lines of Code | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y cloc | |
cloc --exclude-dir=target --quiet . # Exclude 'target' directory to avoid counting compiled files |