Add coverage testing #137
Workflow file for this run
This file contains hidden or 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: | |
# Avoid duplicate builds on PRs. | |
branches: | |
- main | |
pull_request: | |
permissions: | |
contents: read | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
version: [22.x, 20.x, 18.x] | |
os: | |
[sfdc-hk-ubuntu-latest, sfdc-hk-macos-latest, sfdc-hk-windows-latest] | |
name: Node ${{ matrix.version }} on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 # java required for testing with wiremock | |
with: | |
java-package: jre | |
java-version: "11" | |
distribution: "zulu" | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.version }} | |
cache: "yarn" | |
- run: yarn install | |
- run: yarn format:check | |
- run: yarn lint | |
- run: yarn test:coverage | |
if: runner.os != 'macOS' | |
- run: yarn test:coverage | |
if: runner.os == 'macOS' | |
env: | |
JAVA_TOOL_OPTIONS: "-Xmx2g" # Was getting java heap fails in only macos during action | |
- run: yarn build |