Skip to content

Commit

Permalink
🌱 Disable husky git hooks in github actions (#95)
Browse files Browse the repository at this point in the history
Avoid installing our git hooks when running CI in github actions since
the `lint-staged` work doesn't matter in CI.

See https://typicode.github.io/husky/how-to.html#ci-server-and-docker

Signed-off-by: Scott J Dickerson <[email protected]>
  • Loading branch information
sjd78 authored Nov 11, 2024
1 parent d5bac40 commit 2403cf1
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 9 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/ci-repo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ concurrency:
group: ci-repo-${{ github.event_name }}-${{ github.ref }}
cancel-in-progress: true

# https://typicode.github.io/husky/how-to.html#ci-server-and-docker
env:
HUSKY: 0

jobs:
build:
name: Build (${{ matrix.arch }})
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/nightly-ci-repo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ on:

workflow_dispatch:

# https://typicode.github.io/husky/how-to.html#ci-server-and-docker
env:
HUSKY: 0

jobs:
nightly:
uses: ./.github/workflows/ci-repo.yml
uses: ./.github/workflows/ci-repo.yml
20 changes: 12 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,23 @@ name: Release
on:
push:
tags:
- '*'
- "*"

workflow_dispatch:
inputs:
tag_name:
description: 'Enter Tag for the release'
description: "Enter Tag for the release"
required: true

prerelease:
description: 'Is this a pre-release?'
description: "Is this a pre-release?"
required: true
type: boolean
default: false
default: false

# https://typicode.github.io/husky/how-to.html#ci-server-and-docker
env:
HUSKY: 0

jobs:
release_prereq:
Expand All @@ -31,7 +36,7 @@ jobs:
arch: windows
max-parallel: 3
outputs:
tag_name: ${{ steps.determine_tag.outputs.tag_name }}
tag_name: ${{ steps.determine_tag.outputs.tag_name }}

steps:
- name: Checkout code
Expand Down Expand Up @@ -60,8 +65,7 @@ jobs:
- name: Run tests (Linux)
if: matrix.arch == 'linux'
working-directory: ./vscode
run:
xvfb-run -a npm run test
run: xvfb-run -a npm run test

# Run tests on macOS
- name: Run tests (macOS)
Expand Down Expand Up @@ -95,7 +99,7 @@ jobs:
release:
name: Final Release
runs-on: ubuntu-latest
needs: release_prereq
needs: release_prereq
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down

0 comments on commit 2403cf1

Please sign in to comment.