Skip to content

Commit

Permalink
Merge branch 'main' into export-select-panel-from-drafts
Browse files Browse the repository at this point in the history
  • Loading branch information
gr2m committed Oct 12, 2023
2 parents 6f15574 + 341243f commit 1bec8cf
Show file tree
Hide file tree
Showing 19 changed files with 1,273 additions and 291 deletions.
24 changes: 0 additions & 24 deletions .github/workflows/changesets.yml

This file was deleted.

25 changes: 25 additions & 0 deletions .github/workflows/check_for_changeset.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Check for changeset

on:
pull_request:
types:
# On by default if you specify no types.
- 'opened'
- 'reopened'
- 'synchronize'
# For `skip-label` only.
- 'labeled'
- 'unlabeled'

jobs:
check-for-changeset:
name: Check for changeset
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: 'Check for changeset'
uses: brettcannon/check-for-changed-files@v1
with:
file-pattern: '.changeset/*.md'
skip-label: 'skip changeset'
failure-message: 'No changeset found. If these changes should not result in a new version, apply the ${skip-label} label to this pull request. If these changes should result in a version bump, please add a changeset https://git.io/J6QvQ'
26 changes: 0 additions & 26 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,6 @@ jobs:
run: npm run lint:md

test:
strategy:
fail-fast: false
matrix:
react: [17, 18]
runs-on: ubuntu-latest
steps:
- name: Checkout repository
Expand All @@ -69,30 +65,16 @@ jobs:
node-version: 18
cache: 'npm'

- name: Set React version
run: node script/set-react-version.js ${{ matrix.react }}

- name: Install dependencies
if: ${{ matrix.react == 17 }}
run: npm install --legacy-peer-deps

- name: Install dependencies
if: ${{ matrix.react == 18 }}
run: npm ci

- name: Build
run: npm run build

- name: Test
run: npm run test -- --coverage
env:
REACT_VERSION_17: ${{ matrix.react == 17 }}

type-check:
strategy:
fail-fast: false
matrix:
react: [17, 18]
runs-on: ubuntu-latest
steps:
- name: Checkout repository
Expand All @@ -104,15 +86,7 @@ jobs:
node-version: 18
cache: 'npm'

- name: Set React version
run: node script/set-react-version.js ${{ matrix.react }}

- name: Install dependencies
if: ${{ matrix.react == 17 }}
run: npm install --legacy-peer-deps

- name: Install dependencies
if: ${{ matrix.react != 17 }}
run: npm ci

- name: Type check
Expand Down
7 changes: 4 additions & 3 deletions docs/content/drafts/Tooltip.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
---
componentId: tooltip
title: Tooltip
status: Alpha
componentId: tooltip_v2
title: Tooltip v2
status: Draft
source: https://github.com/primer/react/blob/main/src/drafts/Tooltip.tsx
---

import data from '../../../src/drafts/Tooltip/Tooltip.docs.json'
Expand Down
6 changes: 4 additions & 2 deletions docs/src/@primer/gatsby-theme-doctocat/nav.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,8 @@
children:
- title: Dialog v2
url: /drafts/Dialog
- title: Hidden
url: /drafts/Hidden
- title: InlineAutocomplete
url: /drafts/InlineAutocomplete
- title: MarkdownEditor
Expand All @@ -170,8 +172,8 @@
url: /drafts/UnderlineNav2
- title: PageHeader
url: /drafts/PageHeader
- title: Hidden
url: /drafts/Hidden
- title: Tooltip v2
url: /drafts/Tooltip
- title: Deprecated
children:
- title: ActionList (legacy)
Expand Down
5 changes: 0 additions & 5 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,11 @@
'use strict'

const path = require('node:path')
const {REACT_VERSION_17} = process.env

/**
* @type {import('jest').Config}
*/
module.exports = {
globals: {
REACT_VERSION_LATEST: REACT_VERSION_17 ? REACT_VERSION_17 !== 'true' : true,
REACT_VERSION_17: REACT_VERSION_17 === 'true',
},
testEnvironment: 'jsdom',
cacheDirectory: '.test',
collectCoverageFrom: ['src/**/*.{js,jsx,ts,tsx}', '!src/stories/**', '!**/*.stories.{js,jsx,ts,tsx}'],
Expand Down
Loading

0 comments on commit 1bec8cf

Please sign in to comment.