From 78d013f87ca980386b044e048084ee49b690ec36 Mon Sep 17 00:00:00 2001 From: iCrawl Date: Mon, 18 Jul 2022 14:20:11 +0200 Subject: [PATCH] ci: fix building before linting/testing --- .github/workflows/publish-dev.yml | 22 ---------------------- .github/workflows/test.yml | 6 +++--- package.json | 10 +++++----- 3 files changed, 8 insertions(+), 30 deletions(-) diff --git a/.github/workflows/publish-dev.yml b/.github/workflows/publish-dev.yml index 6e9e45cea..17822fafd 100644 --- a/.github/workflows/publish-dev.yml +++ b/.github/workflows/publish-dev.yml @@ -36,29 +36,7 @@ jobs: cache: 'yarn' cache-dependency-path: yarn.lock - - name: Check previous released version - id: pre-release - run: | - if [[ $(npm view ${{ matrix.package }}@dev version | grep -e "$(jq --raw-output '.version' packages/${{ matrix.folder }}/package.json)\..*-$(git rev-parse --short HEAD)") ]]; \ - then echo '::set-output name=release::false'; \ - else echo '::set-output name=release::true'; fi - - - name: Install dependencies - if: steps.pre-release.outputs.release == 'true' - run: yarn --immutable - - - name: Build dependencies - if: steps.pre-release.outputs.release == 'true' - run: yarn build - - - name: Deprecate old versions - if: steps.pre-release.outputs.release == 'true' - run: npm deprecate ${{ matrix.package }}@"~$(jq --raw-output '.version' packages/${{ matrix.folder }}/package.json)" "no longer supported" || true - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} - - name: Publish - if: steps.pre-release.outputs.release == 'true' run: | yarn workspace ${{ matrix.package }} release --preid "dev.$(date +%s)-$(git rev-parse --short HEAD)" yarn workspace ${{ matrix.package }} npm publish --tag dev || true diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1a3fe0a9c..4178f20b3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,6 +18,9 @@ jobs: - name: Install dependencies run: yarn --immutable + - name: Build dependencies + run: yarn build + - name: ESLint run: yarn lint @@ -27,6 +30,3 @@ jobs: - name: Upload Coverage uses: ./packages/actions/src/uploadCoverage if: github.repository_owner == 'discordjs' - - - name: Build - run: yarn build diff --git a/package.json b/package.json index 1739dc0aa..8e1142f8a 100644 --- a/package.json +++ b/package.json @@ -4,13 +4,13 @@ "description": "A powerful library for interacting with the Discord API", "private": true, "scripts": { - "build": "yarn workspaces foreach --topological run build", - "test": "yarn workspaces foreach --topological run test", - "lint": "yarn workspaces foreach --topological run lint", - "format": "yarn workspaces foreach --topological run format", + "build": "yarn workspaces foreach --parallel --topological run build", + "test": "yarn workspaces foreach --parallel --topological run test", + "lint": "yarn workspaces foreach --parallel --topological run lint", + "format": "yarn workspaces foreach --parallel --topological run format", "fmt": "yarn format", "postinstall": "is-ci || husky install", - "docs": "yarn workspaces foreach --topological run docs", + "docs": "yarn workspaces foreach --parallel --topological run docs", "update": "yarn upgrade-interactive" }, "contributors": [