Skip to content

chore: add unit tests + ci #2

chore: add unit tests + ci

chore: add unit tests + ci #2

Workflow file for this run

name: PR Continuous Integration - Pass Emploi Connect
on:
push:
branches: [develop, master]
pull_request:
types:
- opened
- reopened
- synchronize
- ready_for_review
jobs:
test:
runs-on: ubuntu-latest
if: ${{ !github.event.pull_request.draft }}
strategy:
matrix:
node-version: [20.11.0]
services:
redis:
image: redis:7-alpine
ports:
- 6767:6379
steps:
- name: Check out repository code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
yarn: cache
- name: Install dependencies
run: yarn
- name: Lint project
run: yarn lint
- name: Tests
run: yarn test:ci
env:
REDIS_URL: redis://localhost:6767
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}