-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a6ff937
commit 179fa02
Showing
1 changed file
with
32 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,38 @@ | ||
name: Lint | ||
on: [push, pull_request] | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
lint: | ||
name: Lint Resource | ||
name: Lint | ||
timeout-minutes: 30 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Lint | ||
uses: iLLeniumStudios/fivem-lua-lint-action@v2 | ||
with: | ||
capture: "junit.xml" | ||
args: "-t --formatter JUnit" | ||
extra_libs: mysql | ||
- name: Generate Lint Report | ||
if: always() | ||
uses: mikepenz/action-junit-report@v3 | ||
- name: Checkout | ||
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3 | ||
- name: Set up Node | ||
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3 | ||
with: | ||
report_paths: "**/junit.xml" | ||
check_name: Linting Report | ||
fail_on_failure: false | ||
node-version: '16' | ||
cache: yarn | ||
- name: Installation | ||
run: yarn | ||
# run: yarn install --immutable # Fails if yarn.lock is modified (unfortunately only works for Yarn 2, and --frozen-lockfile is not the same!) | ||
- name: Check immutable yarn.lock | ||
run: git diff --exit-code | ||
- name: Lint | ||
run: | | ||
echo "::add-matcher::.github/workflows/cspell-problem-matcher.json" | ||
yarn lint:ci | ||
- name: Prettier Code | ||
run: yarn format:diff |