39 generate signed jwt containing in it the hash of the payload of the request #50
Workflow file for this run
This file contains 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: analyses | |
# Trigger workflow on push and pull request events targeting the main branch. | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
# Step 1: Install dependencies and cache node_modules | |
install: | |
runs-on: ubuntu-latest | |
steps: | |
# Check out the code from the repository | |
- uses: actions/checkout@v2 | |
# Install project dependencies using npm ci for clean install | |
- name: Install Dependencies | |
run: npm ci | |
# Cache node_modules for future jobs to speed up workflow | |
- name: Cache node modules | |
uses: actions/cache@v2 | |
with: | |
path: node_modules | |
key: ${{ github.sha }} | |
build: | |
needs: install | |
runs-on: ubuntu-latest | |
steps: | |
# Check out the code from the repository | |
- uses: actions/checkout@v2 | |
# Use cached node_modules to avoid reinstalling dependencies | |
- name: Cached node modules | |
uses: actions/cache@v2 | |
with: | |
path: node_modules | |
key: ${{ github.sha }} | |
# Run the build command | |
- name: Build | |
run: npm run build | |
# Step 2: Run lint checks with ESLint | |
lint: | |
needs: install # Depends on the install job | |
runs-on: ubuntu-latest | |
steps: | |
# Check out the code from the repository | |
- uses: actions/checkout@v2 | |
# Use cached node_modules to avoid reinstalling dependencies | |
- name: Cached node modules | |
uses: actions/cache@v2 | |
with: | |
path: node_modules | |
key: ${{ github.sha }} | |
# Run ESLint to check for code quality issues | |
- name: ESLint | |
run: npm run lint:check | |
# Step 3: Run Prettier to check code formatting | |
prettier: | |
needs: install # Depends on the install job | |
runs-on: ubuntu-latest | |
steps: | |
# Check out the code from the repository | |
- uses: actions/checkout@v2 | |
# Use cached node_modules to avoid reinstalling dependencies | |
- name: Cached node modules | |
uses: actions/cache@v2 | |
with: | |
path: node_modules | |
key: ${{ github.sha }} | |
# Run Prettier to check code formatting | |
- name: Prettier | |
run: npm run prettier:check | |
# Step 4: Run TypeScript checks to ensure there are no type errors | |
typescript: | |
needs: install # Depends on the install job | |
runs-on: ubuntu-latest | |
steps: | |
# Check out the code from the repository | |
- uses: actions/checkout@v2 | |
# Use cached node_modules to avoid reinstalling dependencies | |
- name: Cached node modules | |
uses: actions/cache@v2 | |
with: | |
path: node_modules | |
key: ${{ github.sha }} | |
# Run TypeScript checks | |
- name: TypeScript | |
run: npm run ts:check | |
# Step 5: Run unit tests | |
unit_tests: | |
needs: install # Depends on the install job | |
runs-on: ubuntu-latest | |
steps: | |
# Check out the code from the repository | |
- uses: actions/checkout@v2 | |
# Use cached node_modules to avoid reinstalling dependencies | |
- name: Cached node modules | |
uses: actions/cache@v2 | |
with: | |
path: node_modules | |
key: ${{ github.sha }} | |
# Run unit tests | |
- name: Unit tests | |
run: npm run test:unit |