Skip to content

Commit eb40572

Browse files
committed
cd: github action: add lint and test before publish
1 parent be1626e commit eb40572

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

.github/workflows/release.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,18 @@ jobs:
3030
cache: "yarn" # Automatic caching for Yarn
3131
registry-url: "https://registry.npmjs.org"
3232

33-
# Ensure npm 11.5.1 or later is installed
3433
- name: Update npm
3534
run: npm install -g npm@latest
3635

3736
- name: Install dependencies
3837
run: yarn install --frozen-lockfile
3938

40-
# Todo: add tests step here
39+
- name: Run lint
40+
# This runs lint with eslint
41+
run: yarn lint
42+
43+
- name: Run tests with coverage
44+
run: yarn test:coverage
4145

4246
- name: Set Version from Tag
4347
run: |
@@ -55,16 +59,14 @@ jobs:
5559
run: yarn build
5660

5761
- name: Publish to NPM
58-
env:
59-
NPM_CONFIG_PROVENANCE: true
6062
run: |
6163
if [[ "${{ github.ref_name }}" == *"-"* ]]; then
6264
npm publish --provenance --access public --tag next
6365
else
6466
npm publish --provenance --access public
6567
fi
6668
67-
- name: ⬆️ Upload NPM Debug Log on Failure
69+
- name: Upload NPM Debug Log on Failure
6870
if: failure()
6971
uses: actions/upload-artifact@v4
7072
with:

0 commit comments

Comments
 (0)