Skip to content

Commit 4f27bb2

Browse files
authored
Merge pull request #155 from matrix-org/andybalaam/use-yarn-in-ci
Switch CI jobs to use yarn, to match the recommendation in the README
2 parents 7f1d3cc + 41810ad commit 4f27bb2

File tree

2 files changed

+26
-14
lines changed

2 files changed

+26
-14
lines changed

.github/workflows/ci.yml

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,17 @@ jobs:
4040
- name: Install Node.js
4141
uses: actions/setup-node@v3
4242

43-
- name: Install NPM dependencies
44-
run: npm install
43+
- name: Install yarn
44+
run: npm install --global yarn
45+
46+
- name: Install dependencies
47+
run: yarn install
4548

4649
- name: Run eslint
47-
run: npm run lint:eslint
50+
run: yarn lint:eslint
4851

4952
- name: Run prettier
50-
run: npm run lint:prettier
53+
run: yarn lint:prettier
5154

5255
test:
5356
name: test
@@ -75,20 +78,23 @@ jobs:
7578
with:
7679
node-version: 20.0
7780

78-
- name: Install NPM dependencies
79-
run: npm install
81+
- name: Install yarn
82+
run: npm install --global yarn
83+
84+
- name: Install dependencies
85+
run: yarn install
8086

8187
- name: Build the WebAssembly + JavaScript binding
82-
run: npm run build
88+
run: yarn build
8389

8490
- name: Check typescript types
85-
run: npm run lint:types
91+
run: yarn lint:types
8692

8793
- name: Test the JavaScript binding
88-
run: npm run test
94+
run: yarn test
8995

9096
- name: Build the documentation
91-
run: npm run doc
97+
run: yarn doc
9298

9399
docs:
94100
name: docs
@@ -121,10 +127,13 @@ jobs:
121127
with:
122128
save-if: ${{ github.ref == 'refs/heads/main' }}
123129

130+
- name: Install yarn
131+
run: npm install --global yarn
132+
124133
- name: Build `matrix-sdk-crypto-js` doc
125134
run: |
126-
npm install
127-
npm run build && npm run doc
135+
yarn install
136+
yarn build && yarn doc
128137
129138
- name: Upload artifact
130139
if: github.event_name == 'push' && github.ref == 'refs/heads/main'

.github/workflows/release.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,11 @@ jobs:
3939
with:
4040
node-version: 20.0
4141

42-
- name: Install NPM dependencies
43-
run: npm install
42+
- name: Install yarn
43+
run: npm install --global yarn
44+
45+
- name: Install dependencies
46+
run: yarn install
4447

4548
- name: Publish the WebAssembly + JavaScript binding (imply building + testing)
4649
uses: JS-DevTools/npm-publish@v1

0 commit comments

Comments
 (0)