Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: github actions #224

Merged
merged 11 commits into from
Mar 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 12 additions & 24 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: Benchmark

on:
push:
branches:
- master
pull_request:

jobs:
Expand All @@ -12,36 +14,22 @@ jobs:
- name: Checkout the repository
uses: actions/checkout@v2

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: 'npm'

- name: Install PNPM
uses: pnpm/action-setup@v2
uses: pnpm/action-setup@v3
with:
version: 8
run_install: false

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV

- uses: actions/cache@v3
name: Setup pnpm cache
- name: Setup Node.js
uses: actions/setup-node@v4
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
node-version-file: '.nvmrc'
cache: 'pnpm'

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

- name: Bootstrap dependencies
run: npm run build && npm run bootstrap
- name: Build
run: pnpm build

- name: Run benchmark
run: cd benchmark && npm start
run: cd benchmark && pnpm start
28 changes: 7 additions & 21 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,33 +17,19 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: 'npm'

- name: Install PNPM
uses: pnpm/action-setup@v2
uses: pnpm/action-setup@v3
with:
version: 8
run_install: false

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV

- uses: actions/cache@v3
name: Setup pnpm cache
- name: Setup Node.js
uses: actions/setup-node@v4
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
node-version-file: '.nvmrc'
cache: 'pnpm'

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

- name: Create Release Pull Request or Publish to npm
id: changesets
Expand Down
83 changes: 35 additions & 48 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Tests

on: [push, pull_request]
on:
push:
branches:
- master
pull_request:

jobs:
test:
Expand All @@ -11,50 +15,33 @@ jobs:
node-version: [16.x, 18.x, 19.x]

steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 2

- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'

- name: Install PNPM ${{ matrix.node-version }}
uses: pnpm/action-setup@v2
with:
version: 8
run_install: false

- name: Get pnpm store directory ${{ matrix.node-version }}
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV

- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}-${{ matrix.node-version }}
restore-keys: |
${{ runner.os }}-pnpm-store-${{ matrix.node-version }}

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

- name: Install Codecov
run: pnpm install --global codecov

- name: Bootstrap packages
run: npm run bootstrap

- name: Run the lint
run: npm run lint

- name: Run the coverage
run: npm run cover

- name: Run the coverage
run: codecov
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 2

- name: Install PNPM
uses: pnpm/action-setup@v3
with:
version: 8

- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'

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

- name: Run the lint
run: pnpm lint

- name: Install coverage
run: pnpm install --global codecov

- name: Run the coverage
run: pnpm cover

- name: Run the coverage
run: codecov
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,4 @@ typings/

# benchmark test files
benchmark/html5
.nx
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v16.14.2
v19.9.0
Loading
Loading