Skip to content

Add code coverage #1128

Add code coverage

Add code coverage #1128

name: Continuous integration
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out wala/ML sources
uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Install Python.
uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'pip'
- name: Install Python dependencies.
run: pip install -r requirements.txt
- name: Check formatting with spotless.
run: mvn spotless:check -B
- name: Check formatting with Black.
run: black --fast --check .
- name: Checkout wala/IDE sources.
run: git clone --depth=50 https://github.com/wala/IDE ${{ runner.temp }}/IDE
- name: Checkout ponder-lab/jython3 sources.
run: git clone --depth=50 https://github.com/ponder-lab/jython3.git ${{ runner.temp }}/jython3
- name: Install Jython3.
run: |
pushd ${{ runner.temp }}/jython3
ant
pushd dist
mvn install:install-file -Dfile=./jython-dev.jar -DgroupId="org.python" -DartifactId="jython3" -Dversion="0.0.1-SNAPSHOT" -Dpackaging="jar" -DgeneratePom=true -B
popd
popd
shell: bash
- name: Install IDE.
run: |
pushd ${{ runner.temp }}/IDE/com.ibm.wala.cast.lsp
mvn install -B -q -DskipTests
popd
- name: Build with Maven
run: mvn -Dlogging.config.file=\${maven.multiModuleProjectDirectory}/logging.ci.properties verify -B -Pjacoco coveralls:report -DrepoToken=$COVERALLS_REPO_TOKEN
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
- name: Coveralls GitHub Action
uses: coverallsapp/[email protected]
- name: Deploy with Maven
run: mvn -s .travis.settings.xml -Dgithub.username=$GITHUB_USERNAME -Dgithub.password=$GITHUB_TOKEN deploy -DskipTests -B
env:
GITHUB_USERNAME: ${{ secrets.GITHUB_USERNAME }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}