Skip to content

Commit

Permalink
add prettier to github workflows
Browse files Browse the repository at this point in the history
- rename test workflow to `validate_datapack`
- change test workflow to only run on commits on PRs and commits that are pushed to main
  • Loading branch information
TheAfroOfDoom committed Dec 29, 2023
1 parent 8194563 commit 1a80473
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: validate
name: validate_datapack

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

# TODO(37): add linting
jobs:
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/validate_scripts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: validate_scripts

on:
pull_request:
push:
branches:
- main

jobs:
prettier:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Prettify code
uses: creyD/[email protected]
with:
dry: True
prettier_options: '--check .'
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Ignore datapack/resourcepack
datapacks
resourcepack

0 comments on commit 1a80473

Please sign in to comment.