Skip to content

Update environment variable names #25

Update environment variable names

Update environment variable names #25

Workflow file for this run

name: API - DEV - Continuous Integration
on:
push:
branches:
- development
paths:
- 'api/**'
workflow_dispatch:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependencies
run: npm install --prefix api
- name: Run linter
run: |
export PATH=$(pwd)/api/node_modules/.bin:$PATH
npm run lint --prefix api
dependency-check:
runs-on: ubuntu-latest
needs: lint
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependencies
run: npm install --prefix api
- name: Run dependency check
run: npm audit --audit-level=high --prefix api
security:
runs-on: ubuntu-latest
needs: dependency-check
permissions:
actions: read
contents: read
security-events: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependencies
run: npm install --prefix api
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: javascript
- name: Autobuild
uses: github/codeql-action/autobuild@v2
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
test:
runs-on: ubuntu-latest
needs: security
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependencies
run: npm install --prefix api
- name: Run tests
run: npm test --prefix api
code-coverage:
runs-on: ubuntu-latest
needs: test
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependencies
run: npm install --prefix api
- name: Run tests with coverage
run: npm run test --prefix api -- --coverage
- name: Upload coverage report
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: api/coverage