Skip to content

Commit

Permalink
⚙️ config(ci): Always run NPM postinstall hook in workflows.
Browse files Browse the repository at this point in the history
  • Loading branch information
make-github-pseudonymous-again committed May 14, 2024
1 parent 3f95e37 commit 098279c
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 11 deletions.
17 changes: 17 additions & 0 deletions .github/actions/install/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: install
description: >
Installs Meteor and NPM dependencies.
runs:

using: composite

steps:

- name: Install 💾
id: install
uses: meteor-actions/install@v6

- name: Postinstall 🪝
if: steps.install.outputs.ran-npm-install-hooks != 'true'
run: meteor npm run postinstall
2 changes: 1 addition & 1 deletion .github/workflows/ci:build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
uses: actions/checkout@v4

- name: Install 💾
uses: meteor-actions/install@v6
uses: ./.github/actions/install

- name: Get Meteor's Node version
id: meteor-node
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci:commit-msg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
fetch-depth: 0

- name: Install 💾
uses: meteor-actions/install@v6
uses: ./.github/actions/install

- name: Lint last pushed commit 👕
if: github.event_name == 'push'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci:lint-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
uses: actions/checkout@v4

- name: Install 💾
uses: meteor-actions/install@v6
uses: ./.github/actions/install

- name: Lint config 👕
run: meteor npm run lint-config
2 changes: 1 addition & 1 deletion .github/workflows/ci:lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
uses: actions/checkout@v4

- name: Install 💾
uses: meteor-actions/install@v6
uses: ./.github/actions/install

- name: Lint 👕
run: meteor npm run lint
8 changes: 2 additions & 6 deletions .github/workflows/ci:test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,7 @@ jobs:
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}

- name: Install 💾
uses: meteor-actions/install@v6

# TODO Run only when install action hits the cache.
- name: Postinstall
run: meteor npm run postinstall
uses: ./.github/actions/install

- name: Cache build 💽
uses: meteor-actions/cache-build@v4
Expand Down Expand Up @@ -96,7 +92,7 @@ jobs:
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}

- name: Install 💾
uses: meteor-actions/install@v6
uses: ./.github/actions/install

- name: Cache build 💽
uses: meteor-actions/cache-build@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci:type-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
uses: actions/checkout@v4

- name: Install 💾
uses: meteor-actions/install@v6
uses: ./.github/actions/install

- name: TypeScript check ☑️
run: meteor npm run tsc

0 comments on commit 098279c

Please sign in to comment.