Skip to content

Commit

Permalink
Add code coverage to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
FourteenBrush authored Mar 4, 2024
1 parent e31db3d commit d4333e7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ name: Java CI with Maven

on:
push:
branches: [ "master" ]
branches: [ "master", "main" ]
pull_request:
branches: [ "master" ]
branches: [ "master", "main" ]

jobs:
build:
if: "!contains(github.event.head_commit.message, '[skip-ci]')"
if: ${{ !contains(github.event.head_commit.message, '[skip-ci]') }}
runs-on: ubuntu-latest

steps:
Expand All @@ -27,7 +27,15 @@ jobs:
java-version: '17'
distribution: 'adopt'
cache: maven

- name: Build with Maven
run: mvn -B package --file pom.xml

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4.0.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: FourteenBrush/MathExpressionParser

- name: Trigger Jitpack build
run: curl "https://jitpack.io/com/github/FourteenBrush/MathExpressionParser/${GITHUB_SHA:0:10}/build.log"
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
# MathExpressionParser

![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/FourteenBrush/MathExpressionParser/build.yml)
![Code Coverage](https://img.shields.io/codecov/c/github/FourteenBrush/MathExpressionParser)
![GitHub License](https://img.shields.io/github/license/FourteenBrush/MathExpressionParser)
[![GitHub release](https://img.shields.io/github/v/release/FourteenBrush/MathExpressionParser)](https://github.com/FourteenBrush/MathExpressionParser/releases)

A lightweight Java library for parsing and evaluating mathematical expressions.

## Dependency

There is both a Maven and Gradle dependency, which work with JitPack. In order to use them, replace `Tag` with the appropriate version which you can find on the
Don't forget to replace `Tag` with the appropriate version, which you can find on the
[releases page](https://github.com/FourteenBrush/MathExpressionParser/releases) or on top of this file.

### Maven:
Expand Down

0 comments on commit d4333e7

Please sign in to comment.