From 586c48a830ab11fd37ed6cd1d53c7841c9468f52 Mon Sep 17 00:00:00 2001 From: Jan-Paul Kleemans Date: Mon, 20 Nov 2023 16:27:37 +0100 Subject: [PATCH] Add vue-cli --- .github/workflows/e2e.yml | 50 +++++++++++++++++++++++++++++++++++---- 1 file changed, 45 insertions(+), 5 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 2e5fae9..e37ca22 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -4,9 +4,14 @@ jobs: vite-cli: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - run: npm create vite@latest test-app -- --template vue-ts - - run: | + - name: Checkout + uses: actions/checkout@v4 + + - name: Install vue-ts + run: npm create vite@latest test-app -- --template vue-ts + + - name: Add example code + run: | mv ./example/src/App.vue ./test-app/src/App.vue mv ./example/vite.config.ts ./test-app/vite.config.ts mv ./example/src/vite-env.d.ts ./test-app/src/vite-env.d.ts @@ -14,11 +19,46 @@ jobs: mv ./example/src/assets/style.svg ./test-app/src/assets/style.svg mv ./example/src/assets/circle.svg ./test-app/src/assets/circle.svg mv ./example/public/root.svg ./test-app/public/root.svg - - run: | + + - name: Build + run: | cd test-app npm install npm install vite-svg-loader --save-dev npm run build - - uses: cypress-io/github-action@v6 + + - name: Test + uses: cypress-io/github-action@v6 + with: + start: npm run test:preview + + vue-cli: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install vue-ts + run: npm create vue@latest test-app -- --default --ts + + - name: Add example code + run: | + mv ./example/src/App.vue ./test-app/src/App.vue + mv ./example/vite.config.ts ./test-app/vite.config.ts + mv ./example/src/vite-env.d.ts ./test-app/src/vite-env.d.ts + mv ./example/src/assets/test.svg ./test-app/src/assets/test.svg + mv ./example/src/assets/style.svg ./test-app/src/assets/style.svg + mv ./example/src/assets/circle.svg ./test-app/src/assets/circle.svg + mv ./example/public/root.svg ./test-app/public/root.svg + + - name: Build + run: | + cd test-app + npm install + npm install vite-svg-loader --save-dev + npm run build + + - name: Test + uses: cypress-io/github-action@v6 with: start: npm run test:preview