Skip to content

Commit

Permalink
chore: scrub references to next-runtime-minimal
Browse files Browse the repository at this point in the history
  • Loading branch information
serhalp committed Jun 13, 2024
1 parent 3216224 commit 1873d11
Show file tree
Hide file tree
Showing 8 changed files with 190 additions and 213 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/e2e-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Download latest e2e results
if: ${{ steps.get-run-id.outputs.runId }}
run: |
echo "Downloading latest test results from run https://github.com/netlify/next-runtime-minimal/actions/runs/${{ steps.get-run-id.outputs.runId }}"
echo "Downloading latest test results from run https://github.com/netlify/next-runtime/actions/runs/${{ steps.get-run-id.outputs.runId }}"
rm e2e-report/data/test-results.json
gh run download ${{ steps.get-run-id.outputs.runId }} -n "latest-test-results.json" -D e2e-report/data/ --repo $GITHUB_REPOSITORY
- name: Install site dependencies
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/test-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ env:
NETLIFY_SITE_ID: 1d5a5c76-d445-4ae5-b694-b0d3f2e2c395
NEXT_TEST_CONTINUE_ON_ERROR: 1
next-path: next.js
runtime-path: next-runtime-minimal
runtime-path: next-runtime
GH_TOKEN: ${{ github.token }}
jobs:
setup:
Expand Down Expand Up @@ -143,7 +143,7 @@ jobs:
uses: actions/cache@v4
with:
path: ${{ steps.npm-cache.outputs.PATH }}
key: node-cache-${{ hashFiles('next-runtime-minimal/package-lock.json') }}
key: node-cache-${{ hashFiles('next-runtime/package-lock.json') }}
restore-keys: |
node-cache-
Expand Down Expand Up @@ -191,11 +191,11 @@ jobs:
run: |
# This is when the manifest version was changed
if [ `npx semver -p -r ">=14.0.4-canary.26" ${{ matrix.version_spec.version }}` ]; then
echo "filters=../next-runtime-minimal/tests/netlify-e2e.cjs" >> $GITHUB_OUTPUT
echo "skip-retry=../next-runtime-minimal/tests/e2e-skip-retry.json" >> $GITHUB_OUTPUT
echo "filters=../next-runtime/tests/netlify-e2e.cjs" >> $GITHUB_OUTPUT
echo "skip-retry=../next-runtime/tests/e2e-skip-retry.json" >> $GITHUB_OUTPUT
else
echo "filters=../next-runtime-minimal/tests/netlify-e2e-legacy.json" >> $GITHUB_OUTPUT
echo "skip-retry=../next-runtime-minimal/tests/e2e-skip-retry-legacy.json" >> $GITHUB_OUTPUT
echo "filters=../next-runtime/tests/netlify-e2e-legacy.json" >> $GITHUB_OUTPUT
echo "skip-retry=../next-runtime/tests/e2e-skip-retry-legacy.json" >> $GITHUB_OUTPUT
fi
- name: run tests
Expand Down Expand Up @@ -243,7 +243,7 @@ jobs:
- name: Get and format Github issues
if: success() || failure()
run: |
gh issue list --label "Next.js e2e test failure" --json number,body > report/issues.json
gh issue list --label "Next.js e2e test failure" --json url,body > report/issues.json
deno run -A tools/deno/ghIssues2json.ts tests/test-config.json report/issues.json
- name: Publish Test Report
Expand Down
361 changes: 169 additions & 192 deletions CHANGELOG.md

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/netlify/next-runtime-minimal.git"
"url": "git+https://github.com/netlify/next-runtime.git"
},
"keywords": [
"nextjs",
Expand All @@ -44,9 +44,9 @@
],
"license": "MIT",
"bugs": {
"url": "https://github.com/netlify/next-runtime-minimal/issues"
"url": "https://github.com/netlify/next-runtime/issues"
},
"homepage": "https://github.com/netlify/next-runtime-minimal#readme",
"homepage": "https://github.com/netlify/next-runtime#readme",
"devDependencies": {
"@fastly/http-compute-js": "1.1.4",
"@netlify/blobs": "^7.3.0",
Expand Down
2 changes: 1 addition & 1 deletion run-local-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export NEXT_TEST_MODE=deploy
export RUNTIME_DIR=$(pwd)
cp tests/netlify-deploy.ts ../next.js/test/lib/next-modes/netlify-deploy.ts
cd ../next.js/
git apply ../next-runtime-minimal/tests/e2e-utils.patch
git apply ../next-runtime/tests/e2e-utils.patch
node run-tests.js --type e2e --debug --test-pattern $1
git checkout -- test/lib/e2e-utils.ts

6 changes: 3 additions & 3 deletions tests/netlify-deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,11 @@ export class NextDeployInstance extends NextInstance {
[build]
command = "npm run build"
publish = ".next"
[[plugins]]
package = "${path.relative(
this.testDir,
process.env.RUNTIME_DIR || `${process.cwd()}/../next-runtime-minimal`,
process.env.RUNTIME_DIR || `${process.cwd()}/../next-runtime`,
)}"
`

Expand All @@ -83,7 +83,7 @@ export class NextDeployInstance extends NextInstance {
require('console').log(`Using Netlify CLI version:`, res.stdout)
} catch (_) {
require('console').log(`You need to have netlify-cli installed.
You can do this by running: "npm install -g netlify-cli@latest" or "yarn global add netlify-cli@latest"`)
}

Expand Down
2 changes: 1 addition & 1 deletion tools/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ async function bundle(entryPoints, format, watch) {
name: 'mark-runtime-modules-as-external',
setup(pluginBuild) {
pluginBuild.onResolve({ filter: /^\..*\.c?js$/ }, (args) => {
if (args.importer.includes(join('next-runtime-minimal', 'src'))) {
if (args.importer.includes(join('next-runtime', 'src'))) {
return { path: args.path, external: true }
}
})
Expand Down
10 changes: 5 additions & 5 deletions tools/deno/ghIssues2json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@ async function writeToConfig(
}

async function formatIssues(file: string) {
const issues = JSON.parse(await Deno.readTextFile(file))
const issues = JSON.parse(await Deno.readTextFile(file)) as { body: string; url: string }[]
const annotations: Annotation[] = []

issues.forEach((issue: { body: string; number: number }) => {
const name = issue.body.match(/^test: (.+)$/m) || []
const reason = issue.body.match(/^reason: (.+)$/m) || []
issues.forEach(({ url, body }) => {
const name = body.match(/^test: (.+)$/m) || []
const reason = body.match(/^reason: (.+)$/m) || []
const testNames = name[1]?.split(',')

testNames?.forEach((name) => {
annotations.push({
link: `https://github.com/netlify/next-runtime-minimal/issues/${issue.number}`,
link: url,
reason: reason[1],
name: name.trim(),
})
Expand Down

0 comments on commit 1873d11

Please sign in to comment.