Skip to content
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.15.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
IDP_MILO_CONSEILLER_AUTHORIZATION_URL: ${{ secrets.IDP_MILO_CONSEILLER_AUTHORIZATION_URL }}
IDP_MILO_CONSEILLER_CLIENT_ID: ${{ secrets.IDP_MILO_CONSEILLER_CLIENT_ID }}
IDP_MILO_CONSEILLER_CLIENT_SECRET: ${{ secrets.IDP_MILO_CONSEILLER_CLIENT_SECRET }}
IDP_MILO_CONSEILLER_ISSUER: ${{ secrets.IDP_MILO_CONSEILLER_ISSUER }}
IDP_MILO_CONSEILLER_JWKS: ${{ secrets.IDP_MILO_CONSEILLER_JWKS }}
IDP_MILO_CONSEILLER_REDIRECT_URI: ${{ secrets.IDP_MILO_CONSEILLER_REDIRECT_URI }}
IDP_MILO_CONSEILLER_SCOPES: ${{ secrets.IDP_MILO_CONSEILLER_SCOPES }}
IDP_MILO_CONSEILLER_TOKEN_URL: ${{ secrets.IDP_MILO_CONSEILLER_TOKEN_URL }}
IDP_MILO_CONSEILLER_USERINFO: ${{ secrets.IDP_MILO_CONSEILLER_USERINFO }}
JWKS: ${{ secrets.JWKS }}
TEST_MILO_CONSEILLER_OFFLINE_TOKEN: ${{ secrets.TEST_MILO_CONSEILLER_OFFLINE_TOKEN }}
TEST_MILO_CONSEILLER_CEJ_JWT: ${{ secrets.TEST_MILO_CONSEILLER_CEJ_JWT }}
TEST_MILO_CONSEILLER_CEJ_JWT_EXPIRED: ${{ secrets.TEST_MILO_CONSEILLER_CEJ_JWT_EXPIRED }}
CLIENT_WEB_ERROR_CALLBACK: ${{ secrets.CLIENT_WEB_ERROR_CALLBACK }}
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}