From d2827548667520a6ab3fc02e76705bbfb912c84a Mon Sep 17 00:00:00 2001 From: Audric Ackermann Date: Tue, 13 Aug 2024 13:19:02 +1000 Subject: [PATCH] chore: run dedup check on pr too --- .github/workflows/build-binaries.yml | 6 +++++- .github/workflows/pull-request.yml | 8 +++----- .github/workflows/release.yml | 3 ++- actions/deduplicate_fail/action.yml | 9 +++++++++ yarn.lock | 7 +------ 5 files changed, 20 insertions(+), 13 deletions(-) create mode 100644 actions/deduplicate_fail/action.yml diff --git a/.github/workflows/build-binaries.yml b/.github/workflows/build-binaries.yml index 0d81fe895..bb10fc39d 100644 --- a/.github/workflows/build-binaries.yml +++ b/.github/workflows/build-binaries.yml @@ -32,7 +32,11 @@ jobs: - name: Checkout git repo uses: actions/checkout@v3 - - uses: ./actions/setup_and_build + - name: Setup & Build + uses: ./actions/setup_and_build + + - name: Enforce yarn.lock has no duplicates + uses: ./actions/deduplicate_fail - name: Build windows production binaries if: runner.os == 'Windows' diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index caaf5d98f..68974bb15 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -28,7 +28,8 @@ jobs: - name: Checkout git repo uses: actions/checkout@v3 - - uses: ./actions/setup_and_build + - name: Setup & Build + uses: ./actions/setup_and_build - name: Lint Files # no need to lint files on all platforms. Just do it once on the quicker one @@ -36,10 +37,7 @@ jobs: run: yarn lint-full - name: Enforce yarn.lock has no duplicates - # no need to deduplicate yarn.lock on all platforms. Just do it once on the quicker one - if: runner.os == 'Linux' - run: yarn yarn-deduplicate yarn.lock --fail - + uses: ./actions/deduplicate_fail - name: Unit Test run: yarn test diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index acb114a50..905a21fe2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,7 +22,8 @@ jobs: - name: Checkout git repo uses: actions/checkout@v3 - - uses: ./actions/setup_and_build + - name: Setup & Build + uses: ./actions/setup_and_build - name: Build windows production binaries if: runner.os == 'Windows' diff --git a/actions/deduplicate_fail/action.yml b/actions/deduplicate_fail/action.yml new file mode 100644 index 000000000..7fe3567e3 --- /dev/null +++ b/actions/deduplicate_fail/action.yml @@ -0,0 +1,9 @@ +name: 'Deduplicate check' +description: 'Deduplicate check' +runs: + using: 'composite' + steps: + - name: Enforce yarn.lock has no duplicates + shell: bash + if: runner.os == 'Linux' + run: yarn yarn-deduplicate yarn.lock --fail diff --git a/yarn.lock b/yarn.lock index e031e5e3a..e89dfdafd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6839,12 +6839,7 @@ semver@^6.0.0, semver@^6.2.0, semver@^6.3.0, semver@^6.3.1: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== -semver@^7.1.2, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semver@^7.5.4: - version "7.6.2" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.2.tgz#1e3b34759f896e8f14d6134732ce798aeb0c6e13" - integrity sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w== - -semver@^7.5.0: +semver@^7.1.2, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semver@^7.5.0, semver@^7.5.4: version "7.6.3" resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.3.tgz#980f7b5550bc175fb4dc09403085627f9eb33143" integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==