Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lots of Goodies #24

Merged
merged 19 commits into from
Sep 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
root=true

[*]
end_of_line = lf
insert_final_newline = true
charset = utf-8
trim_trailing_whitespace = true

[*.{mjs,cjs,js,mts,cts,ts,json,vue,html,scss,css,toml,md}]
indent_style = tab

[*.md]
trim_trailing_whitespace = false

[*.{yml,yaml}]
indent_style = space
39 changes: 39 additions & 0 deletions .github/actions/prepare/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Prepare
description: Install and build the app
inputs:
registry:
description: NPM registry to set up for auth
required: false

runs:
using: 'composite'
steps:
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
registry-url: ${{ inputs.registry }}

- uses: pnpm/action-setup@v3
name: Install pnpm
id: pnpm-install
with:
run_install: false

- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT

- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: Install dependencies
shell: bash
run: pnpm install
30 changes: 30 additions & 0 deletions .github/workflows/lint-app.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: App Lint

on:
push:
branches:
- main
pull_request:
branches:
- main

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

env:
NODE_OPTIONS: --max_old_space_size=6144

jobs:
app-lint:
name: App Lint
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Prepare
uses: ./.github/actions/prepare

- name: Run Linter
run: pnpm eslint:lint
30 changes: 30 additions & 0 deletions .github/workflows/lint-oas.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: OAS Lint

on:
push:
branches:
- main
pull_request:
branches:
- main

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

env:
NODE_OPTIONS: --max_old_space_size=6144

jobs:
oas-lint:
name: OAS Lint
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Prepare
uses: ./.github/actions/prepare

- name: Run Linter
run: pnpm oas:lint
30 changes: 30 additions & 0 deletions .github/workflows/typecheck.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Typecheck

on:
push:
branches:
- main
pull_request:
branches:
- main

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

env:
NODE_OPTIONS: --max_old_space_size=6144

jobs:
typecheck:
name: Typecheck
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Prepare
uses: ./.github/actions/prepare

- name: Run Typechecker
run: pnpm typecheck
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,6 @@ logs
!.env.example

.remote


public/oas.yaml
Loading
Loading