Skip to content

Commit

Permalink
chore: update validation
Browse files Browse the repository at this point in the history
  • Loading branch information
Goldziher committed Oct 16, 2023
1 parent 5bd82ba commit e1621f0
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
21 changes: 19 additions & 2 deletions .github/workflows/validate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ jobs:
if: steps.cached-go-dependencies.outputs.cache-hit != 'true'
shell: bash
run: go get -v -t ./...

- name: Setup Node
uses: actions/setup-node@v3
with:
Expand Down Expand Up @@ -60,5 +59,23 @@ jobs:
with:
path: ~/.cache/pre-commit/
key: pre-commit-4|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }}
- name: Execute Pre-Commit
- name: Lint
if: github.ref != 'refs/heads/main'
run: pre-commit run --show-diff-on-failure --color=always --all-files
# on main we are executing the longer linting which includes spotless - but its very slow, so only on main.
- name: Install Task
if: github.ref == 'refs/heads/main'
uses: arduino/setup-task@v1
- name: Setup Java
if: github.ref == 'refs/heads/main'
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Enable gradlew execution
if: github.ref == 'refs/heads/main'
run: chmod +x gradlew
- name: Lint
if: github.ref == 'refs/heads/main'
run: task lint
2 changes: 1 addition & 1 deletion Taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ tasks:
lint:
desc: Lint the project
cmds:
- pre-commit run --all-files
- pre-commit run --show-diff-on-failure --color=always --all-files
- task: lint:android
# database
db:up:
Expand Down

0 comments on commit e1621f0

Please sign in to comment.