From 73e2db6aac1ecdb360508012cebe5faa2f4df60e Mon Sep 17 00:00:00 2001 From: Anthony Fu Date: Thu, 7 Sep 2023 18:04:35 +0200 Subject: [PATCH] chore: update ci --- .github/workflows/ci.yml | 32 ++++++++++++++--------------- cypress.json | 2 +- cypress/integration/basic.spec.ts | 10 ++++----- cypress/integration/warning.spec.ts | 8 ++++---- 4 files changed, 26 insertions(+), 26 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 636fca4..0bd2a24 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,15 +13,15 @@ jobs: lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Install pnpm - uses: pnpm/action-setup@v2.2.1 + uses: pnpm/action-setup@v2 - name: Set node - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: - node-version: 16.x + node-version: lts/* cache: pnpm - name: Install @@ -33,15 +33,15 @@ jobs: typecheck: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Install pnpm - uses: pnpm/action-setup@v2.2.1 + uses: pnpm/action-setup@v2 - name: Set node - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: - node-version: 16.x + node-version: lts/* cache: pnpm - name: Install @@ -55,17 +55,17 @@ jobs: strategy: matrix: - node-version: [14.x, 16.x] + node-version: [18.x, 20.x] os: [ubuntu-latest] fail-fast: false steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Install pnpm - uses: pnpm/action-setup@v2.2.1 + uses: pnpm/action-setup@v2 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} registry-url: https://registry.npmjs.org/ @@ -79,18 +79,18 @@ jobs: test-e2e: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/cache@v2 + - uses: actions/checkout@v3 + - uses: actions/cache@v3 with: path: | ~/.cache key: cypress-cache-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }} - name: Install pnpm - uses: pnpm/action-setup@v2.2.1 + uses: pnpm/action-setup@v2 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} registry-url: https://registry.npmjs.org/ diff --git a/cypress.json b/cypress.json index 0b378ff..bf92111 100644 --- a/cypress.json +++ b/cypress.json @@ -1,4 +1,4 @@ { - "baseUrl": "http://localhost:3000", + "baseUrl": "http://localhost:5173", "chromeWebSecurity": false } diff --git a/cypress/integration/basic.spec.ts b/cypress/integration/basic.spec.ts index 4f1639f..2357688 100644 --- a/cypress/integration/basic.spec.ts +++ b/cypress/integration/basic.spec.ts @@ -11,7 +11,7 @@ context('Basic', () => { }) cy.url() - .should('eq', 'http://localhost:3000/') + .should('eq', 'http://localhost:5173/') cy.get('.image-0 .my-component').should('exist') cy.get('.image-1 .my-component').should('exist') @@ -23,7 +23,7 @@ context('Basic', () => { cy.get('.image-0 .my-component').should('not.exist') cy.url() - .should('eq', 'http://localhost:3000/0') + .should('eq', 'http://localhost:5173/0') // flying cy.get('.circle-0 .my-component').should('not.exist') @@ -39,7 +39,7 @@ context('Basic', () => { cy.get('.circle-0 .my-component').should('not.exist') cy.url() - .should('eq', 'http://localhost:3000/') + .should('eq', 'http://localhost:5173/') // flying cy.get('.image-0 .my-component').should('not.exist') @@ -69,7 +69,7 @@ context('Basic', () => { }) cy.url() - .should('eq', 'http://localhost:3000/0') + .should('eq', 'http://localhost:5173/0') cy.get('@consoleLog').should((_v) => { const v = _v as any as Sinon.SinonStub @@ -86,7 +86,7 @@ context('Basic', () => { cy.get('.circle-0 .my-component').should('not.exist') cy.url() - .should('eq', 'http://localhost:3000/') + .should('eq', 'http://localhost:5173/') // flying cy.get('.image-0 .my-component').should('not.exist') diff --git a/cypress/integration/warning.spec.ts b/cypress/integration/warning.spec.ts index 7eb3102..4ae7b7b 100644 --- a/cypress/integration/warning.spec.ts +++ b/cypress/integration/warning.spec.ts @@ -11,7 +11,7 @@ context('warnings', () => { it('no-size', () => { cy.url() - .should('eq', 'http://localhost:3000/') + .should('eq', 'http://localhost:5173/') cy.get('.image-0 .my-component').should('exist') @@ -21,7 +21,7 @@ context('warnings', () => { cy.get('.image-0 .my-component').should('not.exist') cy.url() - .should('eq', 'http://localhost:3000/warning-no-size') + .should('eq', 'http://localhost:5173/warning-no-size') cy.get('@consoleWarn').should('be.calledWith', '[Vue Starport] The proxy of component "MyComponent" (port "0") has no height on initial render, have you set the size for it?') cy.get('@consoleError').should('not.be.called') @@ -29,7 +29,7 @@ context('warnings', () => { it('port-conflict', () => { cy.url() - .should('eq', 'http://localhost:3000/') + .should('eq', 'http://localhost:5173/') cy.get('.image-0 .my-component').should('exist') @@ -39,7 +39,7 @@ context('warnings', () => { cy.get('.image-0 .my-component').should('not.exist') cy.url() - .should('eq', 'http://localhost:3000/warning-port-conflict') + .should('eq', 'http://localhost:5173/warning-port-conflict') cy.get('@consoleWarn').should('not.be.called') cy.get('@consoleError').should('be.calledWith', '[Vue Starport] Multiple proxies of "MyComponent" with port "0" detected. The later one will be ignored.')