Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
nedbaldessin authored Mar 18, 2024
0 parents commit 59b1687
Show file tree
Hide file tree
Showing 116 changed files with 25,822 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Dockerfile
.dockerignore
node_modules
npm-debug.log
yarn-debug.log
README.md
CHANGELOG.md
.next
.vscode
.github
.kontinuous
.git
7 changes: 7 additions & 0 deletions .env.development
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
NEXT_TELEMETRY_DISABLED=1
NEXT_PUBLIC_SITE_URL=""
NEXT_PUBLIC_SENTRY_DSN="https://xxx/yy"
NEXT_PUBLIC_SENTRY_ENV="dev"
NEXT_PUBLIC_MATOMO_URL=""
NEXT_PUBLIC_MATOMO_SITE_ID=""
NEXT_PUBLIC_APP_REPOSITORY_URL="https://github.com/betagouv/template"
8 changes: 8 additions & 0 deletions .env.production
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
NEXT_TELEMETRY_DISABLED=1
NEXT_PUBLIC_SITE_URL="https://template.beta.gouv.fr/"
NEXT_PUBLIC_SENTRY_DSN="https://xxx/yy"
NEXT_PUBLIC_SENTRY_ENV="production"
NEXT_PUBLIC_MATOMO_URL="https:/stats.beta.gouv.fr"
NEXT_PUBLIC_MATOMO_SITE_ID=63
NEXT_PUBLIC_APP_REPOSITORY_URL="https://github.com/betagouv/template"
PRODUCTION=true
7 changes: 7 additions & 0 deletions .env.staging
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
NEXT_TELEMETRY_DISABLED=1
NEXT_PUBLIC_SITE_URL="https://template.incubateur.net/"
NEXT_PUBLIC_SENTRY_DSN="https://xxx/yy"
NEXT_PUBLIC_SENTRY_ENV="staging"
NEXT_PUBLIC_MATOMO_URL=""
NEXT_PUBLIC_MATOMO_SITE_ID=""
NEXT_PUBLIC_APP_REPOSITORY_URL="https://github.com/betagouv/template"
8 changes: 8 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": [
"next/core-web-vitals",
"plugin:storybook/recommended",
"plugin:jsx-a11y/recommended"
],
"rules": { "react/no-unescaped-entities": "warn" }
}
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/.yarn/releases/** binary
/.yarn/plugins/** binary
4 changes: 4 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Protect workflow files
.github/workflows/*.yml @socialgouv/sre
.github/CODEOWNERS @socialgouv/sre
.kontinuous/ @socialgouv/sre
5 changes: 5 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"enabled": true,
"extends": ["github>SocialGouv/renovate-config:light"],
"baseBranches": ["main", "hasura"]
}
26 changes: 26 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Build

on: [pull_request, push]

concurrency:
cancel-in-progress: true
group: build-${{ github.ref }}

jobs:
build:
name: Build and export
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "yarn"
- name: Install dependencies
run: |
yarn --immutable
- name: Build and export
run: |
yarn build
75 changes: 75 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: ["main"]
pull_request:
# The branches below must be a subset of the branches above
branches: ["main"]
schedule:
- cron: "16 1 * * 5"

concurrency:
cancel-in-progress: true
group: codeql-${{ github.ref }}

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: ["javascript"]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed

steps:
- name: Checkout repository
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
39 changes: 39 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Deploy demo

on:
push:
branches: [main, next]

concurrency:
cancel-in-progress: true
group: deploy-${{ github.ref }}

jobs:
build:
name: Deployment demo on gh-pages
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install NodeJS
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "yarn"

- name: Install dependencies
run: |
yarn --immutable
- name: Build
run: |
yarn build
touch out/.nojekyll
# deploy build to gh-pages
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@4.1.9
with:
branch: gh-pages
folder: out
22 changes: 22 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Testing e2e

on: pull_request

concurrency:
cancel-in-progress: true
group: e2e-${{ github.ref }}

jobs:
e2e:
name: Testing e2e
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Cypress run
uses: cypress-io/github-action@v5
with:
build: yarn build
start: npx serve@latest out
component: false
install-command: yarn --immutable
37 changes: 37 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Lint

on: [pull_request, push]

concurrency:
cancel-in-progress: true
group: lint-${{ github.ref }}

jobs:
code:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "yarn"
- name: Install dependencies
run: |
yarn --immutable
- name: Lint
run: |
yarn lint
docker:
name: Lint Dockerfile
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Lint Dockerfile
uses: hadolint/hadolint-action@v2.1.0
with:
recursive: true
18 changes: 18 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Release

on:
workflow_dispatch:
push:
branches: [main, alpha, beta, next]

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Semantic Release
uses: cycjimmy/semantic-release-action@v4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26 changes: 26 additions & 0 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Testing

on: [pull_request, push]

concurrency:
cancel-in-progress: true
group: testing-${{ github.ref }}

jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "yarn"
- name: Install dependencies
run: |
yarn --immutable
- name: Test code
run: |
yarn test
59 changes: 59 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# local env files
.env.local
.env.development.local
.env.test.local
.env.production.local

# vercel
.vercel

# typescript
*.tsbuildinfo

# VSCode
.vscode

# Cypress
cypress/videos
cypress/screenshots

# Robots.txt
robots.txt

# yarn berry
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions

# storybook
/.out
6 changes: 6 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/sh
if sh -c ': >/dev/tty' >/dev/null 2>/dev/null; then
exec </dev/tty; yarn node-talisman --githook pre-commit -i;
else
yarn node-talisman --githook pre-commit;
fi
8 changes: 8 additions & 0 deletions .kontinuous/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
projectName: fabrique
ciNamespace: ci-fabrique

dependencies:
fabrique:
extends:
- name: ovh
- name: buildkit-service
7 changes: 7 additions & 0 deletions .kontinuous/env/prod/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
jobs:
runs:
build-app:
use: build
with:
buildArgs:
PRODUCTION: "true"
Loading

0 comments on commit 59b1687

Please sign in to comment.