chore: update scripts #178
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
lint: | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
node: [18.x] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout codes | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v2 | |
with: | |
version: 8.6.2 | |
- name: Setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node }} | |
cache: 'pnpm' | |
- name: Install dependencies | |
run: pnpm install --no-frozen-lockfile --ignore-scripts | |
- name: Lint codes | |
run: pnpm lint | |
e2e: | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
node: [18.x] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout codes | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v2 | |
with: | |
version: 8.6.2 | |
- name: Setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node }} | |
cache: 'pnpm' | |
- name: Install dependencies | |
run: pnpm install --no-frozen-lockfile --ignore-scripts | |
- name: Run test | |
run: ./scripts/e2e.sh | |
npm: | |
strategy: | |
matrix: | |
node: [16.x, 18.x] | |
os: [ubuntu-latest] | |
vue: [2.6, 2.7, 3] | |
bridge: [vue-i18n-bridge, vue-router-bridge] | |
type: [commonjs, module] | |
fail-fast: false | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout codes | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node }} | |
- name: Print npm version | |
run: npm -v | |
- name: Test | |
run: node .github/test.js "npm" ${{ matrix.bridge }} ${{ matrix.vue }} ${{matrix.type}} | |
yarn: | |
strategy: | |
matrix: | |
node: [16.x, 18.x] | |
os: [ubuntu-latest] | |
vue: [2.6, 2.7, 3] | |
# yarn: [1.22.19, berry] | |
yarn: [1.22.19] | |
bridge: [vue-i18n-bridge, vue-router-bridge] | |
type: [commonjs, module] | |
fail-fast: false | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout codes | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node }} | |
- name: Install yarn | |
run: yarn set version ${{ matrix.yarn }} | |
- name: Print yarn version | |
run: yarn --version | |
- name: Test | |
run: node .github/test.js "yarn@${{ matrix.yarn }}" ${{ matrix.bridge }} ${{ matrix.vue }} ${{matrix.type}} | |
pnpm: | |
strategy: | |
matrix: | |
node: [16.x, 18.x] | |
os: [ubuntu-latest] | |
bridge: [vue-i18n-bridge, vue-router-bridge] | |
vue: [2.6, 2.7, 3] | |
type: [commonjs, module] | |
fail-fast: false | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout codes | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node }} | |
- name: Install pnpm | |
run: npm i -g pnpm | |
- name: Print pnpm version | |
run: pnpm -v | |
- name: Test | |
run: node .github/test.js "pnpm" ${{ matrix.bridge }} ${{ matrix.vue }} ${{matrix.type}} | |
edge-release: | |
needs: | |
- npm | |
- yarn | |
- pnpm | |
- lint | |
- e2e | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
node: [18.x] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout codes | |
uses: actions/checkout@v4 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v2 | |
with: | |
version: 8.6.2 | |
- name: Setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node }} | |
cache: 'pnpm' | |
- name: Install dependencies | |
run: pnpm install --no-frozen-lockfile --ignore-scripts | |
- name: Release Edge version | |
if: | | |
github.event_name == 'push' && | |
!startsWith(github.event.head_commit.message, '[skip-release]') && | |
!startsWith(github.event.head_commit.message, 'chore') && | |
!startsWith(github.event.head_commit.message, 'docs') | |
run: ./scripts/release-edge.sh | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.NODE_AUTH_TOKEN}} |