Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
c032 committed Jul 28, 2024
0 parents commit 945443b
Show file tree
Hide file tree
Showing 56 changed files with 12,183 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/actions/nodejs/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: "nodejs"

inputs:
lint:
type: "boolean"
required: false
default: "true"

test:
type: "boolean"
required: false
default: "true"

working-directory:
type: "string"
required: false
default: "."

runs:
using: "composite"
steps:
- name: "Setup Node.js."
uses: "actions/setup-node@v4"
with:
node-version: "20.x"
check-latest: true
cache: "npm"
cache-dependency-path: "${{ github.event.inputs.working-directory }}/**/package-lock.json"

- name: "Install dependencies."
shell: "bash"
working-directory: "${{ github.event.inputs.working-directory }}"
run: |
npm ci
- name: "Build."
shell: "bash"
working-directory: "${{ github.event.inputs.working-directory }}"
run: |
npm run build
- name: "Lint."
if: "${{ github.event.inputs.lint == 'true' }}"
shell: "bash"
working-directory: "${{ github.event.inputs.working-directory }}"
run: |
npm run lint
- name: "Run tests."
if: "${{ github.event.inputs.test == 'true' }}"
shell: "bash"
working-directory: "${{ github.event.inputs.working-directory }}"
run: |
npm run test
18 changes: 18 additions & 0 deletions .github/workflows/api.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: "api"

on:
workflow_dispatch:
push:
paths:
- "**"
- "api/**"

jobs:
check:
runs-on: "ubuntu-latest"
if: "github.ref == 'refs/heads/main'"
steps:
- uses: "actions/checkout@v4"
- uses: "./.github/actions/nodejs"
with:
working-directory: "./api"
22 changes: 22 additions & 0 deletions .github/workflows/pull_request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: "pull_request"

on:
workflow_dispatch:
pull_request:
branches:
- "main"
types:
- "opened"
- "edited"
- "reopened"
- "ready_for_review"
- "review_requested"

jobs:
api:
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v4"
- uses: "./.github/actions/nodejs"
with:
working-directory: "./api"
12 changes: 12 additions & 0 deletions api/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.dockerignore
Dockerfile

.git
.gitignore

.npmrc
node_modules
npm-debug.log

build
dist
12 changes: 12 additions & 0 deletions api/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = tab
insert_final_newline = true

[*.sql]
indent_size = 4
indent_style = tab
56 changes: 56 additions & 0 deletions api/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# compiled output
/dist
/node_modules
/build

# Logs
logs
*.log
npm-debug.log*
pnpm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# OS
.DS_Store

# Tests
/coverage
/.nyc_output

# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local

# temp directory
.temp
.tmp

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
Loading

0 comments on commit 945443b

Please sign in to comment.