Skip to content

Commit

Permalink
fix: use next version in smoke tests (#547)
Browse files Browse the repository at this point in the history
* fix: use next version in smoke tests

* test: update react rc version

---------

Co-authored-by: Michal Piechowiak <[email protected]>
  • Loading branch information
mrstork and pieh authored May 28, 2024
1 parent b2a2362 commit 6bfd871
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -208,10 +208,19 @@ jobs:
run: |
npm i -g netlify-cli
netlify login
- name: Resolve Next.js version
id: resolve-next-version
shell: bash
run: |
RESOLVED_VERSION=$(npm view next@${{ matrix.version }} version)
echo "version=$RESOLVED_VERSION" >> $GITHUB_OUTPUT
echo "Resolved Next.js version for 'next@${{ matrix.version }}' is '$RESOLVED_VERSION'"
- name: 'Smoke tests'
run: npm run test:ci:smoke
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_TOKEN }}
NEXT_VERSION: ${{ matrix.version }}
NEXT_RESOLVED_VERSION: ${{ steps.resolve-next-version.outputs.version }}

merge-reports:
if: always()
Expand Down
4 changes: 2 additions & 2 deletions tests/utils/next-version-helpers.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
import { readFile, writeFile } from 'node:fs/promises'

import fg from 'fast-glob'
import { valid, satisfies, gte } from 'semver'
import { gte, satisfies, valid } from 'semver'

const FUTURE_NEXT_PATCH_VERSION = '14.999.0'

const NEXT_VERSION_REQUIRES_REACT_19 = '14.3.0-canary.45'
// TODO: Update this when React 19 is released
const REACT_19_VERSION = '19.0.0-rc-3f1436cca1-20240516'
const REACT_19_VERSION = '19.0.0-rc-f994737d14-20240522'
const REACT_18_VERSION = '18.2.0'

/**
Expand Down

0 comments on commit 6bfd871

Please sign in to comment.