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

ci: add format workflows #328

Merged
merged 1 commit into from
Jan 23, 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
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@ end_of_line = LF
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.yml]
indent_style = space
32 changes: 32 additions & 0 deletions .github/workflows/format-files-prettier.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Format Files Prettier

on:
pull_request:
branches:
- main
paths:
- "**.md"
- "**.mdx"
- "**.yml"
- "**.yaml"
- "**.toml"
- "**.html"
- "**.css"
push:
branches:
- main

jobs:
prettier:
runs-on: ubuntu-latest

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

- name: Run Prettier
uses: creyD/[email protected]
with:
dry: true
prettier_options: . --check
prettier_version: 4.0.0-alpha.8
31 changes: 31 additions & 0 deletions .github/workflows/format-files.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Format & Lint Files

on:
pull_request:
branches:
- main
paths:
- "**.js"
- "**.jsx"
- "**.ts"
- "**.tsx"
- "**.cjs"
- "**.json"
push:
branches:
- main

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

- name: Setup Biome
uses: biomejs/setup-biome@v2
with:
version: 1.5.2

- name: Run Biome
run: biome ci .
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
name: Build and Test

on:
push:
pull_request:
branches: [main]
branches:
- main
push:
branches:
- main

jobs:
build:
name: Build and Test
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 2

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand Down