fix: sync vue-demi dependency #210
Workflow file for this run
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 | |
# https://github.com/vitejs/vite/blob/main/.github/workflows/ci.yml#L91 | |
# Install playwright's binary under custom directory to cache | |
- name: (non-windows) Set Playwright path and Get playwright version | |
if: runner.os != 'Windows' | |
run: | | |
echo "PLAYWRIGHT_BROWSERS_PATH=$HOME/.cache/playwright-bin" >> $GITHUB_ENV | |
PLAYWRIGHT_VERSION="$(pnpm ls --depth 0 --json -w playwright | jq --raw-output '.[0].devDependencies["playwright"].version')" | |
echo "PLAYWRIGHT_VERSION=$PLAYWRIGHT_VERSION" >> $GITHUB_ENV | |
- name: (windows) Set Playwright path and Get playwright version | |
if: runner.os == 'Windows' | |
run: | | |
echo "PLAYWRIGHT_BROWSERS_PATH=$HOME\.cache\playwright-bin" >> $env:GITHUB_ENV | |
$env:PLAYWRIGHT_VERSION="$(pnpm ls --depth 0 --json -w playwright | jq --raw-output '.[0].devDependencies[\"playwright\"].version')" | |
echo "PLAYWRIGHT_VERSION=$env:PLAYWRIGHT_VERSION" >> $env:GITHUB_ENV | |
- name: Cache Playwright's binary | |
uses: actions/cache@v3 | |
with: | |
key: ${{ runner.os }}-playwright-bin-v1-${{ env.PLAYWRIGHT_VERSION }} | |
path: ${{ env.PLAYWRIGHT_BROWSERS_PATH }} | |
restore-keys: | | |
${{ runner.os }}-playwright-bin-v1- | |
- name: Install Playwright | |
# does not need to explicitly set chromium after https://github.com/microsoft/playwright/issues/14862 is solved | |
run: npx playwright install chromium | |
- name: Run test | |
run: ./scripts/e2e.sh | |
npm: | |
strategy: | |
matrix: | |
node: [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: [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: [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}} |