-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #249 from valerymelou/develop
Prod release
- Loading branch information
Showing
393 changed files
with
167,128 additions
and
18,541 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,13 @@ | ||
version: '2' | ||
exclude_patterns: | ||
- '**/*.spec.ts' | ||
- '**/jest.config.ts' | ||
- '**/test-setup.ts' | ||
- '**/tests/*.py' | ||
checks: | ||
similar-code: | ||
config: | ||
threshold: 100 | ||
identical-code: | ||
config: | ||
threshold: 100 |
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 @@ | ||
node_modules |
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,47 @@ | ||
{ | ||
"root": true, | ||
"ignorePatterns": ["**/*"], | ||
"plugins": ["@nx"], | ||
"overrides": [ | ||
{ | ||
"files": "*.json", | ||
"parser": "jsonc-eslint-parser", | ||
"rules": {} | ||
}, | ||
{ | ||
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"], | ||
"rules": { | ||
"@nx/enforce-module-boundaries": [ | ||
"error", | ||
{ | ||
"enforceBuildableLibDependency": true, | ||
"allow": [], | ||
"depConstraints": [ | ||
{ | ||
"sourceTag": "*", | ||
"onlyDependOnLibsWithTags": ["*"] | ||
} | ||
] | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"files": ["*.ts", "*.tsx"], | ||
"extends": ["plugin:@nx/typescript"], | ||
"rules": {} | ||
}, | ||
{ | ||
"files": ["*.js", "*.jsx"], | ||
"extends": ["plugin:@nx/javascript"], | ||
"rules": {} | ||
}, | ||
{ | ||
"files": ["*.spec.ts", "*.spec.tsx", "*.spec.js", "*.spec.jsx"], | ||
"env": { | ||
"jest": true | ||
}, | ||
"rules": {} | ||
} | ||
] | ||
} |
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,16 @@ | ||
# To get started with Dependabot version updates, you'll need to specify which | ||
# package ecosystems to update and where the package manifests are located. | ||
# Please see the documentation for all configuration options: | ||
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: 'github-actions' | ||
directory: '/' | ||
schedule: | ||
interval: 'weekly' | ||
|
||
- package-ecosystem: 'npm' | ||
directory: '/' | ||
schedule: | ||
interval: 'weekly' |
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,101 @@ | ||
on: | ||
workflow_call: | ||
repository_dispatch: | ||
types: [publish-event] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
environment: ${{ (github.event.client_payload.env && github.event_name == 'repository_dispatch') && github.event.client_payload.env || (github.ref == 'refs/heads/master' && 'production' || 'staging') }} | ||
env: | ||
VM_CONTENTFUL_SPACE: ${{ secrets.VM_CONTENTFUL_SPACE }} | ||
VM_CONTENTFUL_ACCESS_TOKEN: ${{ secrets.VM_CONTENTFUL_ACCESS_TOKEN }} | ||
VM_CONTENTFUL_ENVIRONMENT: ${{ (github.event.client_payload.env && github.event_name == 'repository_dispatch') && github.event.client_payload.env || (github.ref == 'refs/heads/master' && 'production' || 'staging') }} | ||
outputs: | ||
ENVIRONMENT: ${{ env.VM_CONTENTFUL_ENVIRONMENT }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: 'yarn' | ||
|
||
- run: yarn install | ||
# Generate the routes for prerendering. This is the only way I found to pass | ||
# environment variables to the executor. | ||
- run: VM_CONTENTFUL_SPACE=${{ env.VM_CONTENTFUL_SPACE }} VM_CONTENTFUL_ACCESS_TOKEN=${{ env.VM_CONTENTFUL_ACCESS_TOKEN }} VM_CONTENTFUL_ENVIRONMENT=${{ env.VM_CONTENTFUL_ENVIRONMENT }} yarn nx run website:build-routes | ||
- run: npx nx run website:prerender | ||
|
||
- name: Archive artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: build-output-${{ env.VM_CONTENTFUL_ENVIRONMENT }} | ||
path: | | ||
dist | ||
preview: | ||
if: ${{ github.event.pull_request.base.ref == 'develop' }} | ||
needs: build | ||
runs-on: ubuntu-latest | ||
environment: staging | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Download build result | ||
uses: actions/download-artifact@v4 | ||
with: | ||
path: dist | ||
name: build-output-${{ needs.build.outputs.ENVIRONMENT }} | ||
|
||
- uses: FirebaseExtended/action-hosting-deploy@v0 | ||
with: | ||
repoToken: ${{ secrets.GITHUB_TOKEN }} | ||
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT }} | ||
channelId: preview | ||
projectId: ${{ secrets.FIREBASE_PROJECT_ID }} | ||
target: ${{ secrets.FIREBASE_SITE_TARGET }} | ||
|
||
staging: | ||
if: github.ref == 'refs/heads/develop' | ||
needs: build | ||
runs-on: ubuntu-latest | ||
environment: staging | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Download build result | ||
uses: actions/download-artifact@v4 | ||
with: | ||
path: dist | ||
name: build-output-${{ needs.build.outputs.ENVIRONMENT }} | ||
|
||
- uses: FirebaseExtended/action-hosting-deploy@v0 | ||
with: | ||
repoToken: ${{ secrets.GITHUB_TOKEN }} | ||
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT }} | ||
channelId: live | ||
projectId: ${{ secrets.FIREBASE_PROJECT_ID }} | ||
target: ${{ secrets.FIREBASE_SITE_TARGET }} | ||
|
||
production: | ||
if: github.ref == 'refs/heads/master' | ||
needs: build | ||
runs-on: ubuntu-latest | ||
environment: production | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Download build result | ||
uses: actions/download-artifact@v4 | ||
with: | ||
path: dist | ||
name: build-output-${{ needs.build.outputs.ENVIRONMENT }} | ||
|
||
- uses: FirebaseExtended/action-hosting-deploy@v0 | ||
with: | ||
repoToken: ${{ secrets.GITHUB_TOKEN }} | ||
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT }} | ||
channelId: live | ||
projectId: ${{ secrets.FIREBASE_PROJECT_ID }} |
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,57 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: ['master', 'develop'] | ||
pull_request: | ||
branches: ['master', 'develop'] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
permissions: | ||
actions: read | ||
contents: read | ||
checks: write | ||
pull-requests: write | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout Code Repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: nrwl/nx-set-shas@v4 | ||
with: | ||
main-branch-name: develop | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: 'yarn' | ||
|
||
- run: yarn install | ||
- run: npx nx affected --target=lint --parallel=3 | ||
- run: npx nx run-many --target=test --parallel=3 --code-coverage | ||
- run: yarn merge-lcov | ||
|
||
- name: Code Coverage | ||
uses: paambaati/[email protected] | ||
env: | ||
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} | ||
with: | ||
coverageLocations: | | ||
${{github.workspace}}/coverage/lcov.info:lcov | ||
deploy: | ||
if: > | ||
(github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/master' || (github.event.pull_request.base.ref == 'develop' && github.event.pull_request.head.repo.full_name == github.repository && github.event.pull_request.user.login == 'valerymelou')) | ||
needs: test | ||
uses: ./.github/workflows/cd.yml | ||
secrets: inherit |
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,6 @@ | ||
# Add files here to ignore them from prettier formatting | ||
/dist | ||
/coverage | ||
/.nx/cache | ||
/.nx/workspace-data | ||
.angular |
Oops, something went wrong.