Skip to content

Commit

Permalink
add custom linting scripts to datapack/scripts workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
TheAfroOfDoom committed Jan 14, 2024
1 parent 8d05ac5 commit 67d1eb2
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
20 changes: 19 additions & 1 deletion .github/workflows/datapack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,28 @@ env:
FABRIC_SERVER: https://meta.fabricmc.net/v2/versions/loader/1.20.4/0.15.3/0.11.2/server/jar
PACKTEST: https://cdn.modrinth.com/data/XsKUhp45/versions/Gq3rUEy6/packtest-1.3-mc1.20.4.jar

# TODO(37): add linting
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Yarn 3.6.3
run: corepack enable
- name: Setup cache
uses: actions/setup-node@v4
with:
cache: 'yarn'
cache-dependency-path: yarn.lock
node-version-file: package.json
- run: yarn
- name: Run lint scripts on datapacks
run: yarn start lint.custom.datapacks
env:
FORCE_COLOR: 2

test:
runs-on: ubuntu-latest
needs: lint
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/scripts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,5 @@ jobs:
- run: yarn
- name: Run ESLint
run: yarn start lint.scripts.eslint.check
- name: Run custom lint scripts on non-datapacks, non-resourcepack files
run: yarn start lint.custom.other

0 comments on commit 67d1eb2

Please sign in to comment.