Skip to content

Merge pull request #1969 from TexasDigitalLibrary/security-patch-yml #2

Merge pull request #1969 from TexasDigitalLibrary/security-patch-yml

Merge pull request #1969 from TexasDigitalLibrary/security-patch-yml #2

Workflow file for this run

name: Build
on: [ push, pull_request, workflow_dispatch ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: "Node Cache"
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-cache-node-${{ hashFiles('**/package.json') }}
- name: "Node Modules Cache"
uses: actions/cache@v3
with:
path: $GITHUB_WORKSPACE/repo/node_modules
key: ${{ runner.os }}-cache-node_modules-${{ hashFiles('**/package.json') }}
- name: "Setup Node"
uses: actions/setup-node@v3
with:
node-version: 16
- name: "Setup Java"
uses: actions/setup-java@v3
with:
java-version: 11
distribution: 'adopt'
cache: 'maven'
- name: "Maven and Node Tests"
run: mvn clean test jacoco:report coveralls:report -DdryRun=true -DtestClient
- name: "Combine Coverage"
run: |
cat coverage/lcov.info | node node_modules/coveralls/bin/coveralls.js -s > coverage/coveralls.json
jq 'reduce inputs as $i (.; .source_files += $i.source_files)' target/coveralls.json coverage/coveralls.json > coveralls.json
- name: "Send to Coveralls"
uses: MikeEdgar/github-action@raw_coverage_file
with:
github-token: ${{ secrets.github_token }}
path-to-file: './coveralls.json'
coverage-format: raw