Skip to content

Commit

Permalink
chore: update ci
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Sep 7, 2023
1 parent a31ce3d commit 73e2db6
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 26 deletions.
32 changes: 16 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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/
Expand All @@ -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/
Expand Down
2 changes: 1 addition & 1 deletion cypress.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"baseUrl": "http://localhost:3000",
"baseUrl": "http://localhost:5173",
"chromeWebSecurity": false
}
10 changes: 5 additions & 5 deletions cypress/integration/basic.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand All @@ -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')
Expand All @@ -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')

Expand Down Expand Up @@ -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
Expand All @@ -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')

Expand Down
8 changes: 4 additions & 4 deletions cypress/integration/warning.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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')

Expand All @@ -21,15 +21,15 @@ 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')
})

it('port-conflict', () => {
cy.url()
.should('eq', 'http://localhost:3000/')
.should('eq', 'http://localhost:5173/')

cy.get('.image-0 .my-component').should('exist')

Expand All @@ -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.')
Expand Down

0 comments on commit 73e2db6

Please sign in to comment.