From 41810ad49c238fd6511a2052db1bea7c3e0538ed Mon Sep 17 00:00:00 2001 From: Andy Balaam Date: Fri, 25 Oct 2024 12:28:17 +0100 Subject: [PATCH] Switch CI jobs to use yarn, to match the recommendation in the README --- .github/workflows/ci.yml | 33 +++++++++++++++++++++------------ .github/workflows/release.yml | 7 +++++-- 2 files changed, 26 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 36b284c..b64352d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,14 +40,17 @@ jobs: - name: Install Node.js uses: actions/setup-node@v3 - - name: Install NPM dependencies - run: npm install + - name: Install yarn + run: npm install --global yarn + + - name: Install dependencies + run: yarn install - name: Run eslint - run: npm run lint:eslint + run: yarn lint:eslint - name: Run prettier - run: npm run lint:prettier + run: yarn lint:prettier test: name: test @@ -75,20 +78,23 @@ jobs: with: node-version: 20.0 - - name: Install NPM dependencies - run: npm install + - name: Install yarn + run: npm install --global yarn + + - name: Install dependencies + run: yarn install - name: Build the WebAssembly + JavaScript binding - run: npm run build + run: yarn build - name: Check typescript types - run: npm run lint:types + run: yarn lint:types - name: Test the JavaScript binding - run: npm run test + run: yarn test - name: Build the documentation - run: npm run doc + run: yarn doc docs: name: docs @@ -121,10 +127,13 @@ jobs: with: save-if: ${{ github.ref == 'refs/heads/main' }} + - name: Install yarn + run: npm install --global yarn + - name: Build `matrix-sdk-crypto-js` doc run: | - npm install - npm run build && npm run doc + yarn install + yarn build && yarn doc - name: Upload artifact if: github.event_name == 'push' && github.ref == 'refs/heads/main' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3fa35e9..4031740 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -39,8 +39,11 @@ jobs: with: node-version: 20.0 - - name: Install NPM dependencies - run: npm install + - name: Install yarn + run: npm install --global yarn + + - name: Install dependencies + run: yarn install - name: Publish the WebAssembly + JavaScript binding (imply building + testing) uses: JS-DevTools/npm-publish@v1