Skip to content
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

v7 major #362

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
71 changes: 4 additions & 67 deletions .github/actions/actionsLib.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/* eslint-env node */
// @ts-check

import fs from 'node:fs'
import path from 'node:path'
import { fileURLToPath } from 'node:url'

Expand Down Expand Up @@ -62,9 +61,9 @@ export function projectCopy(redwoodProjectCwd) {
}

/**
* @param {{ baseKeyPrefix: string, distKeyPrefix: string, canary: boolean }} options
Copy link
Contributor Author

@jtoar jtoar Jan 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • added in chore(e2e): Setup e2e test for streaming SSR #9349
  • this file's done

* @param {{ baseKeyPrefix: string, distKeyPrefix: string }} options
*/
export async function createCacheKeys({ baseKeyPrefix, distKeyPrefix, canary }) {
export async function createCacheKeys({ baseKeyPrefix, distKeyPrefix }) {
const baseKey = [
baseKeyPrefix,
process.env.RUNNER_OS,
Expand All @@ -76,7 +75,7 @@ export async function createCacheKeys({ baseKeyPrefix, distKeyPrefix, canary })
baseKey,
'dependencies',
await hashFiles(['yarn.lock', '.yarnrc.yml'].join('\n')),
].join('-') + (canary ? '-canary' : '')
].join('-')

const distKey = [
dependenciesKey,
Expand All @@ -91,73 +90,11 @@ export async function createCacheKeys({ baseKeyPrefix, distKeyPrefix, canary })
'lerna.json',
'packages',
].join('\n'))
].join('-') + (canary ? '-canary' : '')
].join('-')

return {
baseKey,
dependenciesKey,
distKey
}
}

/**
* @callback ExecInProject
* @param {string} commandLine command to execute (can include additional args). Must be correctly escaped.
* @param {Omit<ExecOptions, "cwd">=} options exec options. See ExecOptions
* @returns {Promise<unknown>} exit code
*/

/**
* @param {string} testProjectPath
* @param {string} fixtureName
* @param {Object} core
* @param {(key: string, value: string) => void} core.setOutput
* @param {ExecInProject} execInProject
* @returns {Promise<void>}
*/
export async function setUpRscTestProject(
testProjectPath,
fixtureName,
core,
execInProject
) {
core.setOutput('test-project-path', testProjectPath)

console.log('rwPath', REDWOOD_FRAMEWORK_PATH)
console.log('testProjectPath', testProjectPath)

const fixturePath = path.join(
REDWOOD_FRAMEWORK_PATH,
'__fixtures__',
fixtureName
)
const rwBinPath = path.join(
REDWOOD_FRAMEWORK_PATH,
'packages/cli/dist/index.js'
)
const rwfwBinPath = path.join(
REDWOOD_FRAMEWORK_PATH,
'packages/cli/dist/rwfw.js'
)

console.log(`Creating project at ${testProjectPath}`)
console.log()
fs.cpSync(fixturePath, testProjectPath, { recursive: true })

console.log(`Adding framework dependencies to ${testProjectPath}`)
await projectDeps(testProjectPath)
console.log()

console.log(`Installing node_modules in ${testProjectPath}`)
await execInProject('yarn install')

console.log(`Copying over framework files to ${testProjectPath}`)
await execInProject(`node ${rwfwBinPath} project:copy`, {
env: { RWFW_PATH: REDWOOD_FRAMEWORK_PATH },
})
console.log()

console.log(`Building project in ${testProjectPath}`)
await execInProject(`node ${rwBinPath} build -v`)
console.log()
}
34 changes: 0 additions & 34 deletions .github/actions/detect-changes/cases/rsc.mjs

This file was deleted.

27 changes: 0 additions & 27 deletions .github/actions/detect-changes/cases/ssr.mjs

This file was deleted.

2 changes: 0 additions & 2 deletions .github/actions/detect-changes/detectChanges.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import fs from 'node:fs'

import core from '@actions/core'
import { hasCodeChanges } from './cases/code_changes.mjs'
import { rscChanged } from './cases/rsc.mjs'
import { ssrChanged } from './cases/ssr.mjs'

const getPrNumber = () => {
// Example GITHUB_REF refs/pull/9544/merge
Expand Down
29 changes: 0 additions & 29 deletions .github/actions/set-up-rsa-project/README.md

This file was deleted.

10 changes: 0 additions & 10 deletions .github/actions/set-up-rsa-project/action.yaml

This file was deleted.

11 changes: 0 additions & 11 deletions .github/actions/set-up-rsa-project/jsconfig.json

This file was deleted.

6 changes: 0 additions & 6 deletions .github/actions/set-up-rsa-project/package.json

This file was deleted.

22 changes: 0 additions & 22 deletions .github/actions/set-up-rsa-project/setUpRsaProjectGitHub.mjs

This file was deleted.

111 changes: 0 additions & 111 deletions .github/actions/set-up-rsa-project/setUpRsaProjectLocally.mjs

This file was deleted.

Loading
Loading