Skip to content

Update node-ci-workflow.yml #93

Update node-ci-workflow.yml

Update node-ci-workflow.yml #93

# This workflow will build and test a Node.js project
name: Deploy to Firebase Functions via github action
on:
push:
branches: ["feature/*"]
workflow_call:
jobs:
build:
runs-on: ubuntu-22.04
timeout-minutes: 5
permissions:
checks: write
steps:
- uses: actions/checkout@v4
- name: Set up Node v18
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Install dependencies
working-directory: .
run: find ./* -maxdepth 1 -name package.json -execdir npm ci \;
# - name: Lint with ESLint
# run: DEBUG=eslint:cli-engine npx eslint .
# - name: Test with Jest
# run: npx jest -c ./src/jest.config.js --ci --coverage --reporters=default --reporters=jest-junit
# - name: Publish Test Report
# uses: mikepenz/action-junit-report@v3
# if: success() || failure()
# with:
# report_paths: '**/junit.xml'
# detailed_summary: true
# include_passed: true
- name: Run Snyk to check for vulnerabilities
uses: snyk/actions/node@master
continue-on-error: true
with:
args: '--all-projects --sarif-file-output=snyk.sarif'
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
- name: Upload snyk result to GitHub Code Scanning
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: snyk.sarif