docs(legal): add MIT license #2
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: Build | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
permissions: | |
contents: read | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '21' | |
distribution: 'temurin' | |
- name: Setup Gradle | |
uses: gradle/gradle-build-action@v2 | |
- name: Build with Gradle | |
run: ./gradlew build | |
- name: Test with Gradle | |
run: ./gradlew test | |
- name: Generate JaCoCo Coverage Report | |
run: ./gradlew jacocoTestReport | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: ./build/reports/jacoco/test/jacocoTestReport.xml | |
- name: Generate Documentation | |
run: ./gradlew dokkaHtml | |
- name: Archive documentation | |
uses: actions/upload-artifact@v3 | |
with: | |
name: documentation | |
path: build/dokka/html/ | |
- name: Check Code Coverage | |
run: | | |
COVERAGE=$(./gradlew jacocoTestCoverageVerification) | |
if [[ $COVERAGE == *"FAILURE"* ]]; then | |
echo "Code coverage is below 80%" | |
exit 1 | |
fi |