mage/.github/workflows/ci.yml
2021-10-06 12:59:27 -05:00

64 lines
1.8 KiB
YAML

name: CI
on:
push:
branches:
- github-actions
pull_request:
branches:
- master
env:
MAVEN_OPTS: -Xmx3g -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=120
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
with:
java-version: 8
java-package: jdk+fx
# https://github.com/actions/setup-java#supported-distributions
distribution: zulu
cache: maven
# https://docs.travis-ci.com/user/languages/java/#maven-dependency-management
- run: >
mvn
install
jacoco:prepare-agent
--define jacoco.skip=false
--define maven.javadoc.skip=true
--define skipTests=true
--batch-mode
--show-version
# https://docs.travis-ci.com/user/languages/java/#maven-default-script-command
# tests are interdependent and require a specific order
# running in parallel causes some tests to fail
- run: mvn test -B # -T 1C
- name: Parse branch name
env:
BRANCH: ${{ github.head_ref || github.ref }}
id: setup
run: |
echo "::set-output name=branch-name::${BRANCH#refs/heads/}"
- env:
CI_BUILD_NUMBER: ${{ github.run_id }}
CI_BUILD_URL: https://github.com/${{ github.repository }}/comit/${{ github.sha }}/checks
CI_BRANCH: ${{ steps.setup.output.branch-name }}
CI_NAME: github
CI_PULL_REQUEST: ${{ github.event.pull_request.number }}
run: >
mvn
jacoco:report
jacoco:report-aggregate
verify
coveralls:report
--define jacoco.skip=false
--define repoToken=${{ secrets.GITHUB_TOKEN }}