-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
339 eslint production build #340
Conversation
we still need to check eslint somewhere in this process though. so I'm creating the build-test-lint workflow. ref: https://nextjs.org/docs/pages/api-reference/next-config-js/eslint
this commit change means we no longer get the error: "Detected next.config.js, no exported configuration found. https://nextjs.org/docs/messages/empty-configuration"
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
ref: https://nextjs.org/docs/app/building-your-application/testing/cypress#continuous-integration-ci ref: https://github.com/vercel/next.js/tree/canary/examples/with-cypress ref: https://github.com/cypress-io/github-action#end-to-end-testing ref: https://docs.cypress.io/guides/continuous-integration/github-actions
// Warning: This allows production builds to successfully complete even if | ||
// your project has ESLint errors. | ||
// ref: https://nextjs.org/docs/pages/api-reference/next-config-js/eslint | ||
ignoreDuringBuilds: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// TODO(alishaevn): add these cookies to pages/legal-notices/cookie-policy.js under | ||
// "Non-essential cookies" with a description and expiration time frame |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
split into 2 lines to appease lint rules
704fa2e
to
90ede7c
Compare
the existing line failed with a "Error: Cannot find module '/home/node/app/bash'" error. Locally and in CI/CD. I found a SO post and tried the suggestion, which worked locally. I'm hoping it will work in CI/CD too. ref: https://stackoverflow.com/a/49647309/8079848
trying to get around the error: > Cypress could not verify that this server is running: > http://localhost:3000 > We are verifying this server because it has been configured as your > baseUrl.
cypress: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Cypress e2e | ||
uses: cypress-io/github-action@v6 | ||
with: | ||
start: yarn start | ||
wait-on: 'http://localhost:3000' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
eslint: | ||
needs: build | ||
uses: scientist-softserv/actions/.github/workflows/[email protected] | ||
with: | ||
lint_cmd: docker compose run web sh -c 'yarn && yarn lint' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ref: https://github.com/scientist-softserv/viva/blob/main/.github/workflows/build-test-lint.yaml#L36-L40
I had to edit the lint_cmd
slightly because I kept getting an error about not being able to find "bash".
name: 'Build Test Lint' | ||
run-name: Build Test Lint of ${{ github.ref_name }} by @${{ github.actor }} | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
inputs: | ||
debug_enabled: | ||
type: boolean | ||
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)' | ||
required: false | ||
default: false | ||
|
||
jobs: | ||
build: | ||
uses: scientist-softserv/actions/.github/workflows/[email protected] | ||
secrets: inherit | ||
with: | ||
platforms: 'linux/amd64' | ||
webTarget: web |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this already existed in "build.yml". I just moved it here.
# remove the line below to enable the job | ||
if: false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
using this conditional to skip the workflow instead of commenting out the file.
Story
prevent eslint errors from failing a production build
Expected Behavior After Changes
Screenshots / Video
ref: this comment