mirror of
https://github.com/tenrok/BBob.git
synced 2026-05-15 11:59:37 +03:00
fix: github actions (#224)
* fix: github actions * fix: node setup * fix: node setup cache * fix: node and npm * fix: pnpm workspace and .gititnore * fix: pnpm node setup * fix: github actions * fix: lock file * fix: workflow install after setup node * fix: lock file * fix: vue3 tests
This commit is contained in:
@@ -2,6 +2,8 @@ name: Benchmark
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
pull_request:
|
pull_request:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@@ -12,36 +14,22 @@ jobs:
|
|||||||
- name: Checkout the repository
|
- name: Checkout the repository
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Setup Node.js
|
|
||||||
uses: actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
node-version-file: '.nvmrc'
|
|
||||||
cache: 'npm'
|
|
||||||
|
|
||||||
- name: Install PNPM
|
- name: Install PNPM
|
||||||
uses: pnpm/action-setup@v2
|
uses: pnpm/action-setup@v3
|
||||||
with:
|
with:
|
||||||
version: 8
|
version: 8
|
||||||
run_install: false
|
|
||||||
|
|
||||||
- name: Get pnpm store directory
|
- name: Setup Node.js
|
||||||
shell: bash
|
uses: actions/setup-node@v4
|
||||||
run: |
|
|
||||||
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- uses: actions/cache@v3
|
|
||||||
name: Setup pnpm cache
|
|
||||||
with:
|
with:
|
||||||
path: ${{ env.STORE_PATH }}
|
node-version-file: '.nvmrc'
|
||||||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
cache: 'pnpm'
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-pnpm-store-
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install
|
||||||
run: pnpm install --frozen-lockfile
|
run: pnpm install --frozen-lockfile --strict-peer-dependencies
|
||||||
|
|
||||||
- name: Bootstrap dependencies
|
- name: Build
|
||||||
run: npm run build && npm run bootstrap
|
run: pnpm build
|
||||||
|
|
||||||
- name: Run benchmark
|
- name: Run benchmark
|
||||||
run: cd benchmark && npm start
|
run: cd benchmark && pnpm start
|
||||||
|
|||||||
@@ -17,33 +17,19 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Setup Node.js
|
|
||||||
uses: actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
node-version-file: '.nvmrc'
|
|
||||||
cache: 'npm'
|
|
||||||
|
|
||||||
- name: Install PNPM
|
- name: Install PNPM
|
||||||
uses: pnpm/action-setup@v2
|
uses: pnpm/action-setup@v3
|
||||||
with:
|
with:
|
||||||
version: 8
|
version: 8
|
||||||
run_install: false
|
|
||||||
|
|
||||||
- name: Get pnpm store directory
|
- name: Setup Node.js
|
||||||
shell: bash
|
uses: actions/setup-node@v4
|
||||||
run: |
|
|
||||||
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- uses: actions/cache@v3
|
|
||||||
name: Setup pnpm cache
|
|
||||||
with:
|
with:
|
||||||
path: ${{ env.STORE_PATH }}
|
node-version-file: '.nvmrc'
|
||||||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
cache: 'pnpm'
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-pnpm-store-
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install
|
||||||
run: pnpm install --frozen-lockfile
|
run: pnpm install --frozen-lockfile --strict-peer-dependencies
|
||||||
|
|
||||||
- name: Create Release Pull Request or Publish to npm
|
- name: Create Release Pull Request or Publish to npm
|
||||||
id: changesets
|
id: changesets
|
||||||
|
|||||||
+28
-41
@@ -1,6 +1,10 @@
|
|||||||
name: Tests
|
name: Tests
|
||||||
|
|
||||||
on: [push, pull_request]
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
pull_request:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
@@ -11,50 +15,33 @@ jobs:
|
|||||||
node-version: [16.x, 18.x, 19.x]
|
node-version: [16.x, 18.x, 19.x]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
fetch-depth: 2
|
fetch-depth: 2
|
||||||
|
|
||||||
- name: Set up Node.js ${{ matrix.node-version }}
|
- name: Install PNPM
|
||||||
uses: actions/setup-node@v2
|
uses: pnpm/action-setup@v3
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node-version }}
|
version: 8
|
||||||
cache: 'npm'
|
|
||||||
|
|
||||||
- name: Install PNPM ${{ matrix.node-version }}
|
- name: Set up Node.js ${{ matrix.node-version }}
|
||||||
uses: pnpm/action-setup@v2
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
version: 8
|
node-version: ${{ matrix.node-version }}
|
||||||
run_install: false
|
cache: 'pnpm'
|
||||||
|
|
||||||
- name: Get pnpm store directory ${{ matrix.node-version }}
|
- name: Install
|
||||||
shell: bash
|
run: pnpm install --frozen-lockfile --strict-peer-dependencies
|
||||||
run: |
|
|
||||||
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- uses: actions/cache@v3
|
- name: Run the lint
|
||||||
name: Setup pnpm cache
|
run: pnpm lint
|
||||||
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
|
- name: Install coverage
|
||||||
run: pnpm install --frozen-lockfile
|
run: pnpm install --global codecov
|
||||||
|
|
||||||
- name: Install Codecov
|
- name: Run the coverage
|
||||||
run: pnpm install --global codecov
|
run: pnpm cover
|
||||||
|
|
||||||
- name: Bootstrap packages
|
- name: Run the coverage
|
||||||
run: npm run bootstrap
|
run: codecov
|
||||||
|
|
||||||
- name: Run the lint
|
|
||||||
run: npm run lint
|
|
||||||
|
|
||||||
- name: Run the coverage
|
|
||||||
run: npm run cover
|
|
||||||
|
|
||||||
- name: Run the coverage
|
|
||||||
run: codecov
|
|
||||||
|
|||||||
@@ -63,3 +63,4 @@ typings/
|
|||||||
|
|
||||||
# benchmark test files
|
# benchmark test files
|
||||||
benchmark/html5
|
benchmark/html5
|
||||||
|
.nx
|
||||||
|
|||||||
Generated
-18000
File diff suppressed because it is too large
Load Diff
@@ -10,7 +10,7 @@
|
|||||||
"@bbob/preset-vue": "*",
|
"@bbob/preset-vue": "*",
|
||||||
"@bbob/vue2": "*",
|
"@bbob/vue2": "*",
|
||||||
"core-js": "3.26.1",
|
"core-js": "3.26.1",
|
||||||
"vue": "2.7.14"
|
"vue": "2.7.16"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@vue/cli-plugin-babel": "5.0.8",
|
"@vue/cli-plugin-babel": "5.0.8",
|
||||||
|
|||||||
@@ -81,6 +81,18 @@
|
|||||||
"pnpm": {
|
"pnpm": {
|
||||||
"overrides": {
|
"overrides": {
|
||||||
"semver@>=7.0.0 <7.5.2": ">=7.5.2"
|
"semver@>=7.0.0 <7.5.2": ">=7.5.2"
|
||||||
|
},
|
||||||
|
"packageExtensions": {
|
||||||
|
"@testing-library/vue@7": {
|
||||||
|
"dependencies": {
|
||||||
|
"vue": "3.x"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"@vue/test-utils@2": {
|
||||||
|
"dependencies": {
|
||||||
|
"vue": "3.x"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,8 +19,8 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@bbob/preset-vue": "workspace:*",
|
"@bbob/preset-vue": "workspace:*",
|
||||||
"@testing-library/vue": "5.9.0",
|
"@testing-library/vue": "5.9.0",
|
||||||
"vue": "2.7.14",
|
"vue": "2.7.16",
|
||||||
"vue-template-compiler": "2.7.14"
|
"vue-template-compiler": "2.7.16"
|
||||||
},
|
},
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"module": "es/index.js",
|
"module": "es/index.js",
|
||||||
|
|||||||
@@ -19,7 +19,9 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@bbob/preset-vue": "workspace:*",
|
"@bbob/preset-vue": "workspace:*",
|
||||||
"@testing-library/vue": "7.0.0",
|
"@testing-library/vue": "7.0.0",
|
||||||
"vue": "3.3.4"
|
"@vue/compiler-sfc": "3.4.21",
|
||||||
|
"@vue/test-utils": "2.4.5",
|
||||||
|
"vue": "3.4.21"
|
||||||
},
|
},
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"module": "es/index.js",
|
"module": "es/index.js",
|
||||||
|
|||||||
@@ -1,10 +1,14 @@
|
|||||||
/**
|
/**
|
||||||
* @jest-environment jsdom
|
* @jest-environment jsdom
|
||||||
*/
|
*/
|
||||||
|
import * as Vue from 'vue'
|
||||||
import preset from '@bbob/preset-vue';
|
import preset from '@bbob/preset-vue';
|
||||||
import { render } from '@testing-library/vue';
|
import { render } from '@testing-library/vue';
|
||||||
|
|
||||||
import Component from '../src/Component';
|
import Component from '../src/Component';
|
||||||
|
|
||||||
|
console.log('Vue.v', Vue.version, Vue.createApp);
|
||||||
|
|
||||||
const renderBBCode = (input, options) => {
|
const renderBBCode = (input, options) => {
|
||||||
const { html } = render(Component, {
|
const { html } = render(Component, {
|
||||||
props: {
|
props: {
|
||||||
|
|||||||
Generated
+4738
-162
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user