Skip to content

Commit

Permalink
update node-ts to support coverage version
Browse files Browse the repository at this point in the history
  • Loading branch information
bryopsida committed Aug 25, 2024
1 parent 0eda7d9 commit 1b0c9d2
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions .github/workflows/node-ts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,22 @@ name: Node Typescript QA
on:
workflow_call:
inputs:
extra-packages:
type: string
required: false
default: 'libavahi-compat-libdnssd-dev'
description: 'Extra packages to install before running the test in space delimited format'
node-coverage-version:
type: string
required: false
default: '16.x'
description: 'The Node.js version to collect test coverage against'
os:
default: '["ubuntu-latest"]'
type: string
required: false
node_versions:
default: '["16.x","18.x","20.x"]'
default: '["16.x","18.x","20.x", "22.x"]'
type: string
required: false
continue-on-prod-vulns:
Expand Down Expand Up @@ -43,8 +53,9 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install native dependencies
if: ${{ inputs.extra-packages != '' }}
run: |
sudo apt-get install libavahi-compat-libdnssd-dev
sudo apt-get install ${{ inputs.extra-packages }}
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
Expand All @@ -68,9 +79,9 @@ jobs:
- name: Checkout
uses: actions/checkout@9a9194f87191a7e9055e3e9b95b8cfb13023bb08
- name: Install native dependencies
if: ${{ matrix.os == 'ubuntu-latest' }}
if: ${{ matrix.os == 'ubuntu-latest' && inputs.extra-packages != '' }}
run: |
sudo apt-get install libavahi-compat-libdnssd-dev
sudo apt-get install ${{ inputs.extra-packages }}
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
Expand All @@ -89,7 +100,7 @@ jobs:
- run: npm test
working-directory: ${{ inputs.working-dir }}
- uses: actions/upload-artifact@v4
if: ${{ matrix.node-version == '16.x' }}
if: ${{ matrix.node-version == inputs.node-coverage-version }}
with:
name: coverage
path: |
Expand Down

0 comments on commit 1b0c9d2

Please sign in to comment.