Skip to content

Commit

Permalink
Merge pull request #155 from matrix-org/andybalaam/use-yarn-in-ci
Browse files Browse the repository at this point in the history
Switch CI jobs to use yarn, to match the recommendation in the README
  • Loading branch information
andybalaam authored Oct 28, 2024
2 parents 7f1d3cc + 41810ad commit 4f27bb2
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 14 deletions.
33 changes: 21 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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'
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4f27bb2

Please sign in to comment.