Skip to content

feat(csrf): ✨ Automatic CSRF protection for web routes #56

feat(csrf): ✨ Automatic CSRF protection for web routes

feat(csrf): ✨ Automatic CSRF protection for web routes #56

Workflow file for this run

# This workflow will do a clean installation of node dependencies,
# cache/restore them, build the source code and run tests across different versions of node
# For more information see:
# https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
name: CI
on:
push:
branches: [ main, 1.x ]
pull_request:
branches: [ main, 1.x ]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ['ubuntu-latest']
environment: ['production']
node-version: [18.x, 'latest']
redis-version: ['7.x', 'latest']
mongodb-version: ['5.0', '6.0']
#mysql-version: ['8.3']
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
# See redis enablement at: https://github.com/marketplace/actions/actions-setup-redis#usage
# See mongodb enablement at: https://github.com/marketplace/actions/mongodb-in-github-actions#usage
# See mysql enablement at: https://github.com/marketplace/actions/setup-mysql#usage
steps:
- name: Git checkout
uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Start Redis Server ${{ matrix.redis-version }}
uses: shogo82148/actions-setup-redis@v1
with:
redis-version: ${{ matrix.redis-version }}
- name: Start MongoDB
uses: supercharge/mongodb-github-action@1.10.0
with:
mongodb-version: ${{ matrix.mongodb-version }}
mongodb-port: 27017
#- name: Start MySQL
# uses: mirromutth/mysql-action@v1.1
# with:
# mysql version: ${{ matrix.mysql-version }}
- name: Install dependencies
run: npm ci
- name: Check code standards
run: npm run lint
- name: Build
run: npm run build --if-present
- name: Gather coverage report
run: npm run test:coverage
env:
NODE_ENV: ${{ matrix.environment }}
REDIS_HOST: '127.0.0.1'
# CI: true