Skip to content
Draft

test #3261

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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion .github/actions/yarn/action.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
name: 'Setup Node & yarn'
description: 'Setup a NodeJS environment, install deps, & builds packages'

inputs:
immutable:
description: 'Run yarn install with --immutable (fail if lockfile would change)'
required: false
default: 'true'

runs:
using: 'composite'
steps:
Expand All @@ -13,4 +19,9 @@ runs:
shell: bash
- name: Install dependencies
shell: bash
run: yarn install --immutable
run: |
if [ "${{ inputs.immutable }}" = "true" ]; then
yarn install --immutable
else
yarn install
fi
17 changes: 17 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,30 @@ permissions:

jobs:
test:
name: Test (React ${{ matrix.react_version }})
runs-on: ubuntu-24.04
timeout-minutes: 30
strategy:
matrix:
react_version: [18, 19]
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- name: Set React version
if: matrix.react_version == 18
run: |
node -e "
const p = require('./package.json');
p.resolutions['react'] = '18.3.1';
p.resolutions['react-dom'] = '18.3.1';
p.resolutions['@types/react'] = '18.3.1';
p.resolutions['@types/react-dom'] = '18.3.0';
require('fs').writeFileSync('package.json', JSON.stringify(p, null, 2));
"
- uses: ./.github/actions/yarn
with:
immutable: ${{ matrix.react_version == 19 }}
- name: Fetch main branch
run: git fetch origin main:main
if: github.event_name == 'pull_request'
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@
"@types/invariant": "2.2.29",
"@types/konami-code-js": "^0.8.0",
"@types/lodash": "4.17.23",
"@types/react": "^18.2.0",
"@types/react-dom": "^18.2.0",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"@types/react-test-renderer": "^19.1.0",
"@types/stylis": "^4.2.0",
"@typescript-eslint/eslint-plugin": "^5.15.0",
Expand Down Expand Up @@ -113,10 +113,10 @@
"repository": "git@github.com:Codecademy/gamut.git",
"resolutions": {
"@typescript-eslint/utils": "^5.15.0",
"@types/react": "18.3.1",
"@types/react-dom": "18.3.0",
"react": "18.3.1",
"react-dom": "18.3.1",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"error-ex": "1.3.4"
},
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion packages/gamut-icons/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"@emotion/styled": "^11.3.0",
"@types/react": "^18.0.0 || ^19.0.0",
"lodash": "^4.17.5",
"react": "^17.0.2 || ^18.2.0 || ^19.0.0"
"react": "^18.2.0 || ^19.0.0"
},
"publishConfig": {
"access": "public"
Expand Down
4 changes: 2 additions & 2 deletions packages/gamut-illustrations/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
"@emotion/react": "^11.4.0",
"@emotion/styled": "^11.3.0",
"@types/react": "^18.0.0 || ^19.0.0",
"react": "^17.0.2 || ^18.2.0 || ^19.0.0",
"react-dom": "^17.0.2 || ^18.2.0 || ^19.0.0"
"react": "^18.2.0 || ^19.0.0",
"react-dom": "^18.2.0 || ^19.0.0"
},
"publishConfig": {
"access": "public"
Expand Down
4 changes: 2 additions & 2 deletions packages/gamut-patterns/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
"@emotion/react": "^11.4.0",
"@emotion/styled": "^11.3.0",
"@types/react": "^18.0.0 || ^19.0.0",
"react": "^17.0.2 || ^18.2.0 || ^19.0.0",
"react-dom": "^17.0.2 || ^18.2.0 || ^19.0.0"
"react": "^18.2.0 || ^19.0.0",
"react-dom": "^18.2.0 || ^19.0.0"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion packages/gamut-styles/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"@emotion/styled": "^11.3.0",
"@types/react": "^18.0.0 || ^19.0.0",
"lodash": "^4.17.5",
"react": "^17.0.2 || ^18.2.0 || ^19.0.0",
"react": "^18.2.0 || ^19.0.0",
"stylis": "^4.0.7"
},
"publishConfig": {
Expand Down
2 changes: 1 addition & 1 deletion packages/gamut-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"module": "dist/index.js",
"peerDependencies": {
"@types/react": "^18.0.0 || ^19.0.0",
"react": "^17.0.2 || ^18.2.0 || ^19.0.0"
"react": "^18.2.0 || ^19.0.0"
},
"publishConfig": {
"access": "public"
Expand Down
4 changes: 2 additions & 2 deletions packages/gamut/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
"@emotion/react": "^11.4.0",
"@emotion/styled": "^11.3.0",
"@types/react": "^18.0.0 || ^19.0.0",
"react": "^17.0.2 || ^18.2.0 || ^19.0.0",
"react-dom": "^17.0.2 || ^18.2.0 || ^19.0.0"
"react": "^18.2.0 || ^19.0.0",
"react-dom": "^18.2.0 || ^19.0.0"
},
"publishConfig": {
"access": "public"
Expand Down
Loading