Skip to content

Commit

Permalink
fix: fixed workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
mpsc0x committed Feb 28, 2025
1 parent 06b027c commit 0866145
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 50 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/gen-deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Deploy documentation
on:
push:
branches:
- main
- fixes/evgeni/various
workflow_dispatch:

jobs:
Expand All @@ -15,12 +15,16 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: 18
cache: "pnpm"

- name: Install PNPM
run: pnpm install -g pnpm

- name: Install dependencies
run: npm ci
run: pnpm install --frozen-lockfile

- name: Generate documentation
run: npm run doc
run: pnpm run doc

- name: Deploy documentation
run: npm run deploy-docs
run: pnpm run deploy-docs
26 changes: 17 additions & 9 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Node.js CI

on:
Expand All @@ -14,16 +11,27 @@ jobs:
strategy:
matrix:
node-version: [16.x, 18.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v3

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
- run: npm ci
- run: npm run build
- run: npm run fmt:check
- run: npm test
cache: "pnpm"

- name: Enable PNPM with Corepack
run: corepack enable && corepack prepare pnpm@latest --activate

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Build project
run: pnpm run build

- name: Check formatting
run: pnpm run fmt:check

- name: Run tests
run: pnpm test
22 changes: 0 additions & 22 deletions .github/workflows/npm-publish-dev.yml

This file was deleted.

15 changes: 9 additions & 6 deletions .github/workflows/test-example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,26 @@ jobs:
- name: Checkout code
uses: actions/checkout@v3

- name: Install node
- name: Install PNPM
run: npm install -g pnpm

- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: "18"
cache: "npm"
cache-dependency-path: ./package-lock.json
cache: "pnpm"
cache-dependency-path: ./pnpm-lock.yaml

- name: Install dependencies
run: npm install
run: pnpm install --frozen-lockfile

- name: Build
run: npm run build
run: pnpm run build

- name: Deploy
run: |
echo ${{ secrets.JSON_RPC_URL_PUBLIC }}
if npm run test-borrow-example ; then
if pnpm run test-borrow-example ; then
echo "Borrow example passed!"
else
echo "Failed to run borrow example ..."
Expand Down
24 changes: 15 additions & 9 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,24 @@ jobs:
# Checkout code using bot account
token: ${{ github.token }}

- name: Install PNPM
run: npm install -g pnpm

- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: 'npm'
cache: "pnpm"
cache-dependency-path: ./pnpm-lock.yaml

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Execute unit tests
run: |
npm ci
npm run build
npm run fmt:check
npm run test
pnpm run build
pnpm run fmt:check
pnpm run test
- name: allow access to coverage.sh
run: chmod +x ./scripts/coverage.sh
Expand All @@ -42,12 +48,12 @@ jobs:
- name: Extract coverage
id: coverage
run: |
value=$(npm run test:cov | awk '/All files/ {print $10}' | tr -d '%')
value=$(pnpm run test:cov | awk '/All files/ {print $10}' | tr -d '%')
echo "coverage=$value" >> $GITHUB_OUTPUT
- name: Add test coverage to README
run: ./scripts/coverage.sh
shell: bash
run: ./scripts/coverage.sh
shell: bash
env:
COVERAGE: ${{ steps.coverage.outputs.coverage }}

Expand All @@ -62,4 +68,4 @@ jobs:
with:
commit_message: "Generate coverage badge"
file_pattern: "README.md"
commit_author: Aaave <[email protected]>
commit_author: Aave <[email protected]>

0 comments on commit 0866145

Please sign in to comment.