Skip to content

Nightly Build

Nightly Build #132

Workflow file for this run

name: Nightly Build
on:
schedule:
- cron: '40 20 * * *'
env:
LC_APPLICATION_ID: auditjs
NODE_VERSION: '20'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Lint auditjs
run: npm run lint
- name: Build
run: npm run build
- name: Make test reports directory
run: mkdir -p reports
- name: Run tests
run: npm run test-ci
- name: Upload test results
if: always()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: test-results
path: reports/test-results.xml
- name: Upload coverage
if: always()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: coverage
path: coverage/lcov.info
- name: Dogfood scan (Sonatype Guide)
# continue-on-error: true
run: npm run start -- guide --token ${{ secrets.SONATYPE_GUIDE_TOKEN }}
- name: Dogfood scan (OSSI - deprecated)
continue-on-error: true
run: npm run start -- ossi --user ${{ secrets.OSSI_USERNAME }} --password ${{ secrets.OSSI_TOKEN }}
- name: Dogfood scan (Sonatype Lifecycle)
# continue-on-error: true
run: npm run start -- lifecycle -a ${{ env.LC_APPLICATION_ID }} -s develop -h ${{ vars.SONATYPE_PLATFORM_URL }} -u ${{ secrets.SONATYPE_LIFECYCLE_USERNAME }} -p ${{ secrets.SONATYPE_LIFECYCLE_PASSWORD }}
- name: Dogfood scan (IQ - deprecated)
# continue-on-error: true
run: npm run start -- iq -a ${{ env.LC_APPLICATION_ID }} -s develop -h ${{ vars.SONATYPE_PLATFORM_URL }} -u ${{ secrets.SONATYPE_LIFECYCLE_USERNAME }} -p ${{ secrets.SONATYPE_LIFECYCLE_PASSWORD }}