Skip to content

Commit

Permalink
Merge pull request #3 from ForAeons/master
Browse files Browse the repository at this point in the history
chore: setup test ci, add precommit and prepush checks
  • Loading branch information
wxiaoyun authored Feb 20, 2024
2 parents 0e548d5 + fe66aa5 commit 7ec3ccc
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: JUnit Test

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v2

- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: "11"
distribution: "adopt"

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Build with Gradle
run: ./gradlew build

- name: Run JUnit Tests
run: ./gradlew test
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ hs_err_pid[0-9]*.log
# Test sandbox files
src/test/data/sandbox/

# Build files
bin/
bin/**

# vscode files
.vscode/
.vscode/**

# MacOS custom attributes files created by Finder
.DS_Store
docs/_site/
Expand Down
6 changes: 6 additions & 0 deletions captaingithook.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"hooks": {
"pre-commit": "./gradlew build",
"pre-push": "./gradlew test"
}
}

0 comments on commit 7ec3ccc

Please sign in to comment.