I'm reletevely new to Github actions. I'm using it to run my Cypress tests for my Nuxt JS project.
I've got a workflow set up, which I'll attach, and my Nuxt project contains some JS plugins, quite typical of any Nuxt JS project is to create custom functionality inside of the plugins directory, I've created a getClasses.js file and it's loaded in my config file like this...
plugins: [
{ mode: 'client', src: '~/plugins/Helpers/getClasses.js' }
],
When I trigger a build via Github actions, the build fails with an Exit code 1 with the reason that it can't find my getClasses.js, but it shouldn't need to worry about this since this is a Nuxt file.
What am I missing please?
My workflow:
# This is a basic workflow to help you get started with Actions
name: CI
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ main ]
pull_request:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
# Runs a set of commands using the runners shell
- name: Cypress.io
uses: cypress-io/github-action@v2.3.6
with:
browser: chrome
headless: true
build: npm run generate
start: npm run start
wait-on: 'http://localhost:3000'
config-file: cypress.github-actions.json