Skip to content

Commit

Permalink
feat: fork from cyprus-developer-community
Browse files Browse the repository at this point in the history
  • Loading branch information
PatrickHeneise committed Jul 26, 2024
0 parents commit ba55700
Show file tree
Hide file tree
Showing 81 changed files with 22,106 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
GH_ORG=boulder-js
GH_GRAPHQL_URL=https://api.github.com/graphql

# Development Variables
#
# https://github.com/settings/tokens?type=beta
# Create a fine-grained token with the following permissions:
# Resource owner: boulder-js
# Repository Access: Public Repositories (read only)
# Organization permissions: Members (read only)
GH_PAT=


# Production Variables
#
# Go to Settings -> Developer Settings -> GitHub Apps and create a new GitHub App
# https://github.com/organizations/<your-org>/settings/apps/new
# Set up the permissions and install the application in your organization. The installation ID
# can be found in the URL of the installation page:
# ie: https://github.com/organizations/<your-org>/settings/installations/123456789
# Create a private key and store it on a secure location.
#
# Permissions:
# Repository permissions
## Issues: Read & Write
## Pull Requests: Read & Write
# Organization permissions
## Members: Read & Write

GH_APP_ID=
GH_APP_INSTALLATION_ID=
GH_PRIVATE_KEY=
16 changes: 16 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"env": {
"browser": true,
"es2021": true,
"node": true
},
"extends": ["eslint:recommended", "plugin:solid/recommended"],
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": ["solid"]
}
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
- package-ecosystem: npm
directory: /
schedule:
interval: weekly
open-pull-requests-limit: 10
31 changes: 31 additions & 0 deletions .github/workflows/codequality.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Code Quality

on:
workflow_call:
inputs:
node-version:
type: string
required: false
default: lts/hydrogen

jobs:
codequality:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ inputs.node-version }}
cache: 'npm'

- name: Install Node Modules
run: npm ci

- name: Prettier
run: npm run pretty

- name: Lint
run: npm run lint

# - name: Type check
# run: pnpm typecheck
24 changes: 24 additions & 0 deletions .github/workflows/compress-images.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# https://github.com/marketplace/actions/image-actions

name: Compress Images
on:
pull_request:
paths:
- public/photos/**.jpg
- public/photos/**.jpeg
- public/photos/**.png
- public/photos/**.webp
jobs:
build:
# Only run on Pull Requests within the same repository, and not from forks.
if: github.event.pull_request.head.repo.full_name == github.repository
name: calibreapp/image-actions
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3

- name: Compress Images
uses: calibreapp/image-actions@main
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}
12 changes: 12 additions & 0 deletions .github/workflows/e2e-daily.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Run E2E every day at 09:00am and 21:00am
name: E2E Testing

on:
schedule:
- cron: '0 9,21 * * *'

jobs:
e2e:
uses: ./.github/workflows/e2e.yml
with:
node-version: lts/hydrogen
37 changes: 37 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: End To End Testing

on:
workflow_call:
inputs:
node-version:
type: string
required: true

jobs:
e2e:
runs-on: ubuntu-22.04
timeout-minutes: 10
env:
CI: true
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ inputs.node-version }}
cache: 'npm'

- name: Install Node Modules
run: npm ci

- name: Install Playwright Browsers
run: npx playwright install --with-deps

- name: End To End
run: npm run test:e2e

- uses: actions/upload-artifact@v3
if: always()
with:
name: e2e-report
path: playwright-report
retention-days: 30
28 changes: 28 additions & 0 deletions .github/workflows/gitevents-invite.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: GitEvents Inclusive Organization

on:
push:
pull_request:
discussion:
types: [created, edited, answered]
discussion_comment:
types: [created]
issue_comment:
types: [created]
issues:
types: [opened]

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/hydrogen
- name: gitevents
uses: gitevents/[email protected]
with:
gitevents-app-id: ${{ secrets.GE_APP_ID }}
gitevents-app-private-key: ${{ secrets.GE_APP_PRIVATE_KEY }}
gitevents-app-installation-id: ${{ secrets.GE_APP_INSTALLATION_ID }}
38 changes: 38 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Main Pipeline

on:
push:
branches:
- 'main'

jobs:
codequality:
name: Check
uses: ./.github/workflows/codequality.yml
unit:
name: Check
uses: ./.github/workflows/unit.yml

deploy:
name: Deploy cdc.cy
runs-on: ubuntu-latest
needs: [codequality, unit]
if: needs.codequality.result == 'success' && needs.unit.result == 'success'
steps:
- uses: styfle/[email protected]
- uses: actions/checkout@v4
- uses: superfly/[email protected]
with:
args:
'deploy --app cdc-cy --remote-only --build-arg COMMIT_SHA=${{
github.sha }}'
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}

e2e:
name: Testing
needs: [deploy]
if: needs.deploy.result == 'success'
uses: ./.github/workflows/e2e.yml
with:
node-version: lts/hydrogen
15 changes: 15 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Pull Request Checks
on:
pull_request: {}

permissions:
actions: write
contents: read

jobs:
codequality:
name: Check
uses: ./.github/workflows/codequality.yml
unit:
name: Check
uses: ./.github/workflows/unit.yml
23 changes: 23 additions & 0 deletions .github/workflows/unit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Unit Tests

on:
workflow_call:
inputs:
node-version:
type: string
required: false
default: lts/hydrogen
jobs:
unit:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '${{ inputs.node-version }}'

- name: Install Node Modules
run: npm ci

- name: Unit Tests
run: npm run test
19 changes: 19 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
node_modules
.vscode/
/.cache
/functions/\[\[path\]\].js
/public/build
.env
keyfile.pem
build
.pnpm-debug.log
.eslintcache
/**/uno.css
/test-results/
/playwright-report/
/playwright/.cache/
/e2e-report/
.solid
dist
.output
.vinxi
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx commitlint --edit $1
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx lint-staged
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
strict-peer-dependencies=false
legacy-peer-deps=true
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
build/
node_modules/
playwright-report
6 changes: 6 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"singleQuote": true,
"semi": false,
"trailingComma": "none",
"proseWrap": "always"
}
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# BoulderJS Website
31 changes: 31 additions & 0 deletions app.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import { defineConfig } from '@solidjs/start/config'
import tailwindcss from 'tailwindcss'
import { config } from 'vinxi/plugins/config'

export default defineConfig({
appRoot: 'src',
islands: false,
server: {
preset: 'cloudflare_module',
rollupConfig: {
external: ['__STATIC_CONTENT_MANIFEST', 'node:async_hooks']
},
prerender: {
crawlLinks: true
}
},
vite: {
optimizeDeps: {
entries: []
},
plugins: [
config('tailwind', {
css: {
postcss: {
plugins: [tailwindcss]
}
}
})
]
}
})
8 changes: 8 additions & 0 deletions codegen.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
schema: https://docs.github.com/public/schema.docs.graphql
documents: './src/graphql/*.{js,ts}'
generates:
./gqlgen.ts:
plugins:
- typescript
- typescript-operations
- typed-document-node
9 changes: 9 additions & 0 deletions jsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"compilerOptions": {
"jsx": "preserve",
"jsxImportSource": "solid-js",
"paths": {
"~/*": ["./src/*"]
}
}
}
Loading

0 comments on commit ba55700

Please sign in to comment.