Disable fail-fast, update NPM only if on latest Node.js #447
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: Node.js CI | |
on: [push, workflow_dispatch] | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
node-version: | |
- 14 | |
- latest | |
splunk-version: | |
- 9.4 | |
- latest | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
- name: Set up environment variables | |
run: | | |
cp ./.splunkrc.test ./.splunkrc | |
cp ./.env.test ./.env | |
- name: Launch Splunk ${{ matrix.splunk-version }} | |
run: SPLUNK_VERSION=${{ matrix.splunk-version }} docker compose up -d | |
- name: Use node ${{ matrix.node-version }} | |
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Update npm? | |
if: ${{ matrix.node_version == 'latest' }} | |
run: npm i -g npm | |
- name: Install dependencies | |
run: type -a npm && npm ci | |
- name: Run test suite | |
run: node sdkdo tests | |
env: | |
SPLUNK_HOME: /opt/splunk | |
# fossa-scan: | |
# uses: splunk/oss-scanning-public/.github/workflows/oss-scan.yml@main | |
# secrets: inherit |