-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
35 changed files
with
1,683 additions
and
1,637 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
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 }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
|
||
# This workflow file requires a free account on Semgrep.dev to | ||
# manage rules, file ignores, notifications, and more. | ||
# | ||
# See https://semgrep.dev/docs | ||
|
||
name: Semgrep | ||
|
||
on: | ||
push: | ||
branches: [ develop ] | ||
pull_request: | ||
branches: [ develop ] | ||
schedule: | ||
- cron: '0 8 * * 1' # Tous les lundis à 8h | ||
|
||
jobs: | ||
semgrep: | ||
name: Scan | ||
runs-on: ubuntu-20.04 | ||
container: | ||
image: returntocorp/semgrep | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: semgrep ci | ||
env: | ||
SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }} | ||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/bash | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
yarn lint-staged |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/usr/bin/env bash | ||
echo "Release new version" | ||
|
||
level=$1 | ||
|
||
if [[ $level != "minor" ]] && [[ $level != "major" ]] && [[ $level != "patch" ]]; then | ||
echo "error: level must be minor, major or patch" | ||
exit 1 | ||
fi | ||
|
||
git fetch | ||
yarn lint | ||
yarn version $level | ||
git add package.json | ||
new_version=v$(node -p "require('./package.json').version") | ||
git commit -m $new_version | ||
git tag $new_version | ||
|
||
echo "Released ${new_version}" | ||
echo "To confirm, push the new tag and the release commit" | ||
echo "git push --tags" | ||
echo "git push" | ||
|
||
exit 0 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
sonar.projectKey=SocialGouv_pass-emploi-connect | ||
sonar.organization=socialgouv | ||
|
||
# This is the name and version displayed in the SonarCloud UI. | ||
sonar.projectName=pass-emploi-connect | ||
#sonar.projectVersion=1.0 | ||
|
||
# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows. | ||
sonar.sources=src | ||
sonar.exclusions=test/**/*,scripts/**/* | ||
sonar.tests=test | ||
sonar.javascript.lcov.reportPaths=coverage/lcov.info | ||
sonar.typescript.tsconfigPath=tsconfig.json | ||
|
||
# Encoding of the source code. Default is default system encoding | ||
sonar.sourceEncoding=UTF-8 | ||
|
||
# Ignore rule Tests should include assertions car on import expect depuis un util dans nos tests | ||
sonar.issue.ignore.multicriteria.e1.ruleKey=typescript:S2699 |
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
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
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
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
Oops, something went wrong.