Skip to content

Vue 3 CI/CD

Vue 3 CI/CD #205

Workflow file for this run

name: Vue 3 CI/CD
on: [push, workflow_dispatch]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x]
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: npm install
- name: Build and test
run: |
npm run build
npm run test:unit
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage/lcov.info
flags: unittests
env:
CI: true
VUE_APP_PUBLIC_KEY: ${{ secrets.ik_public_key }}
VUE_APP_PRIVATE_KEY: ${{ secrets.ik_private_key }}
VUE_APP_URL_ENDPOINT: "https://ik.imagekit.io/sdktestingik"
e2e:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x]
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: |
npm install
npm run build
- name: Build Test app
run: |
cd tests/test-app
echo VUE_APP_URL_ENDPOINT = "https://ik.imagekit.io/sdktestingik" > .env;
echo VUE_APP_PUBLIC_KEY = ${{ secrets.ik_public_key }} >> .env;
echo VUE_APP_AUTHENTICATION_ENDPOINT = 'http://localhost:3001/auth' >> .env;
cat .env
npm install
npm run build
cd server
echo VUE_APP_PRIVATE_KEY = ${{ secrets.ik_private_key }} > .env;
cat .env
npm install
- name: Start the app and run E2E tests
uses: cypress-io/github-action@v4
with:
start: npm run start:test-app
wait-on: http://localhost:3000
browser: chrome
headed: true
browser: chrome

Check failure on line 86 in .github/workflows/nodejs.yml

View workflow run for this annotation

GitHub Actions / Vue 3 CI/CD

Invalid workflow file

The workflow is not valid. .github/workflows/nodejs.yml (Line: 86, Col: 11): 'browser' is already defined .github/workflows/nodejs.yml (Line: 87, Col: 11): 'headed' is already defined
headed: true
env:
DEBUG: 'cypress:server:browsers:electron'
CI: true
VUE_APP_PUBLIC_KEY: ${{ secrets.ik_public_key }}
VUE_APP_PRIVATE_KEY: ${{ secrets.ik_private_key }}
VUE_APP_URL_ENDPOINT: "https://ik.imagekit.io/sdktestingik"
VUE_APP_AUTHENTICATION_ENDPOINT: http://localhost:3001/auth