Skip to content

Commit

Permalink
Run postinstall script separately from yarn install
Browse files Browse the repository at this point in the history
Sometimes during installation of the `monitoring` project we were getting random
failures related to the presence of the `prepare-dependencies.sh` script from
`threshold-network/solidity-contracts` in the project subdependencies. Lately we
managed to remove the script from the `development`-tagged packages, but
the script is still present in `goerli` and `mainnet` packages. As `monitoring`
project installs `goerli` and `mainnet` `@keep-network/tbtc-v2` packages during
`yarn install`, the random failures may still occur. As a workaround for this
problem in our CI we will run install step with the `--ignore-scripts` flag
which installs the dependencies without running the postinstall scripts (neither
in subdependencies nor in the main project). We then add a step that executes
`yarn run postinstall` - this way we still execute any postinstall scripts from
the main project (currently it's `npm rebuild bcrypto`) script.
  • Loading branch information
michalinacienciala committed Jul 4, 2023
1 parent 41f3a61 commit 59d86b3
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/monitoring.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,10 @@ jobs:
run: git config --global url."https://".insteadOf git://

- name: Install dependencies
run: yarn install --frozen-lockfile
run: yarn install --frozen-lockfile --ignore-scripts

- name: Run monitoring post-install scripts
run: yarn run postinstall

- name: Build
run: yarn build
Expand Down Expand Up @@ -141,7 +144,10 @@ jobs:
run: git config --global url."https://".insteadOf git://

- name: Install dependencies
run: yarn install --frozen-lockfile
run: yarn install --frozen-lockfile --ignore-scripts

- name: Run monitoring post-install scripts
run: yarn run postinstall

- name: Check formatting
run: yarn format

0 comments on commit 59d86b3

Please sign in to comment.