Skip to content

Commit

Permalink
ci: add format workflows (#328)
Browse files Browse the repository at this point in the history
  • Loading branch information
jer3m01 authored Jan 23, 2024
1 parent b20c960 commit 31fa038
Show file tree
Hide file tree
Showing 6 changed files with 74 additions and 5 deletions.
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

0 comments on commit 31fa038

Please sign in to comment.