-
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
Merged
Merged
Changes from 6 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
b257bc6
don't fail production builds because of eslint errors
alishaevn 5bf1c93
update next config for better build
alishaevn 044883f
attempt to fix the test and lint jobs
alishaevn ba549f9
linting
alishaevn 70119c2
comment out the lint and test jobs for now
alishaevn af84514
update the deploy workflow
alishaevn 90ede7c
wip: debugging the eslint job
alishaevn bef639a
update the eslint lint_cmd
alishaevn aed75d9
wip: cypress in ci
alishaevn c71f9d7
wip: change the wait-on value to use localhost
alishaevn 6977eeb
update the start script
alishaevn cd858c3
revert the start script
alishaevn d0d5020
finalize the cypress commands.
alishaevn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
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 | ||
# TODO(alishaevn): figure out how to get the below passing in github actions | ||
# it may be different than our typical setups since we don't use docker locally | ||
# cypress: | ||
# runs-on: ubuntu-22.04 | ||
# steps: | ||
# - name: Checkout | ||
# uses: actions/checkout@v4 | ||
# - name: Cypress e2e | ||
# uses: cypress-io/github-action@v6 | ||
# - name: Cypress component | ||
# uses: cypress-io/github-action@v6 | ||
# with: | ||
# component: true | ||
# eslint: | ||
# needs: build | ||
# uses: scientist-softserv/actions/.github/workflows/[email protected] | ||
# with: | ||
# lint_cmd: docker-compose run web -- bash -c 'yarn && yarn lint' |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,28 +2,29 @@ | |
# In order to deploy via github actions instead, please update/confirm the following files: | ||
# - ops/production-deploy.tmpl.yaml | ||
# - ops/staging-deploy.tmpl.yaml | ||
# Next, uncomment the following lines | ||
|
||
# name: "Deploy" | ||
# run-name: Deploy (${{ github.ref_name }} -> ${{ inputs.environment }}) by @${{ github.actor }} | ||
# on: | ||
# workflow_dispatch: | ||
# inputs: | ||
# environment: | ||
# description: 'Deploy to Environment' | ||
# required: true | ||
# default: 'staging' | ||
# type: choice | ||
# options: | ||
# - staging | ||
# - production | ||
# debug_enabled: | ||
# type: boolean | ||
# description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)' | ||
# required: false | ||
# default: false | ||
name: "Deploy" | ||
run-name: Deploy (${{ github.ref_name }} -> ${{ inputs.environment }}) by @${{ github.actor }} | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
environment: | ||
description: 'Deploy to Environment' | ||
required: true | ||
default: 'staging' | ||
type: choice | ||
options: | ||
- staging | ||
- production | ||
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: | ||
# deploy: | ||
# uses: scientist-softserv/actions/.github/workflows/[email protected] | ||
# secrets: inherit | ||
jobs: | ||
deploy: | ||
# remove the line below to enable the job | ||
if: false | ||
uses: scientist-softserv/actions/.github/workflows/[email protected] | ||
secrets: inherit |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,3 +17,8 @@ node_modules/ | |
|
||
# Emacs | ||
*.~undo-tree~ | ||
|
||
# Cypress | ||
cypress/results | ||
cypress/screenshots | ||
cypress/videos |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,57 @@ | ||
// This guard clause allows the app to still build in the event another exception handler will be used, | ||
// or the sentry project hasn't been set up yet | ||
if (!process.env.SENTRY_DSN) return | ||
|
||
// This file sets a custom webpack configuration to use your Next.js app | ||
// with Sentry. | ||
// https://nextjs.org/docs/api-reference/next.config.js/introduction | ||
// https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/ | ||
const { withSentryConfig } = require('@sentry/nextjs') | ||
const SENTRY_DSN = process.env.SENTRY_DSN | ||
|
||
const nextConfig = { | ||
let nextConfig = { | ||
output: 'standalone', | ||
reactStrictMode: true, | ||
swcMinify: true, | ||
eslint: { | ||
dirs: ['pages', 'utils'], // Only run ESLint on the 'pages' and 'utils' directories during production builds | ||
}, | ||
sentry: { | ||
// Use `hidden-source-map` rather than `source-map` as the Webpack `devtool` | ||
// for client-side builds. (This will be the default starting in | ||
// `@sentry/nextjs` version 8.0.0.) See | ||
// https://webpack.js.org/configuration/devtool/ and | ||
// https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/#use-hidden-source-map | ||
// for more information. | ||
hideSourceMaps: true, | ||
// 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 commentThe reason will be displayed to describe this comment to others. Learn more. |
||
} | ||
|
||
const sentryWebpackPluginOptions = { | ||
// Additional config options for the Sentry Webpack plugin. Keep in mind that | ||
// the following options are set automatically, and overriding them is not | ||
// recommended: | ||
// release, url, configFile, stripPrefix, urlPrefix, include, ignore | ||
|
||
silent: true, // Suppresses all logs | ||
project: process.env.SENTRY_PROJECT, | ||
org: process.env.SENTRY_ORG, | ||
authToken: process.env.SENTRY_AUTH_TOKEN, | ||
// For all available options, see: | ||
// https://github.com/getsentry/sentry-webpack-plugin#options. | ||
} | ||
module.exports = nextConfig | ||
|
||
// Make sure adding Sentry options is the last code to run before exporting, to | ||
// ensure that your source maps include changes from all other Webpack plugins | ||
module.exports = withSentryConfig( | ||
nextConfig, | ||
sentryWebpackPluginOptions | ||
) | ||
let sentryWebpackPluginOptions = {} | ||
if (SENTRY_DSN) { | ||
nextConfig = { | ||
...nextConfig, | ||
sentry: { | ||
// Use `hidden-source-map` rather than `source-map` as the Webpack `devtool` | ||
// for client-side builds. (This will be the default starting in | ||
// `@sentry/nextjs` version 8.0.0.) See | ||
// https://webpack.js.org/configuration/devtool/ and | ||
// https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/#use-hidden-source-map | ||
// for more information. | ||
hideSourceMaps: true, | ||
}, | ||
} | ||
|
||
sentryWebpackPluginOptions = { | ||
// Additional config options for the Sentry Webpack plugin. Keep in mind that | ||
// the following options are set automatically, and overriding them is not | ||
// recommended: | ||
// release, url, configFile, stripPrefix, urlPrefix, include, ignore | ||
|
||
silent: true, // Suppresses all logs | ||
project: process.env.SENTRY_PROJECT, | ||
org: process.env.SENTRY_ORG, | ||
authToken: process.env.SENTRY_AUTH_TOKEN, | ||
// For all available options, see: | ||
// https://github.com/getsentry/sentry-webpack-plugin#options | ||
} | ||
|
||
module.exports = withSentryConfig( | ||
nextConfig, | ||
sentryWebpackPluginOptions | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,7 +35,8 @@ export const enableCookies = () => { | |
|
||
const nonEssentialCookies = [ | ||
// TODO(alishaevn): create this list | ||
// TODO(alishaevn): add these cookies to pages/legal-notices/cookie-policy.js under "Non-essential cookies" with a description and expiration time frame | ||
// TODO(alishaevn): add these cookies to pages/legal-notices/cookie-policy.js under | ||
// "Non-essential cookies" with a description and expiration time frame | ||
Comment on lines
+38
to
+39
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. split into 2 lines to appease lint rules |
||
] | ||
|
||
export const disableCookies = () => { | ||
|
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
ref: https://stackoverflow.com/a/75905933/8079848