diff --git a/.github/main.workflow b/.github/main.workflow index 5b76e486d01..8f128f56ea8 100644 --- a/.github/main.workflow +++ b/.github/main.workflow @@ -1,14 +1,21 @@ workflow "Lint and test" { on = "push" - resolves = ["lint", "test"] + resolves = ["install", "lint", "test"] +} + +action "install" { + uses = "actions/npm@94e6933" + args = "ci" } action "lint" { + needs = ["install"] uses = "actions/npm@94e6933" - args = "lint" + args = "run lint" } action "test" { - args = "test" + needs = ["install"] uses = "actions/npm@94e6933" + args = "test" } diff --git a/pages/doc-components/Header.js b/pages/doc-components/Header.js index c3676412341..eb41db03ac3 100644 --- a/pages/doc-components/Header.js +++ b/pages/doc-components/Header.js @@ -51,7 +51,7 @@ const Header = ({router}) => ( borderColor="gray.6" display="inline-block" > - + Menu diff --git a/pages/doc-components/IndexHero.js b/pages/doc-components/IndexHero.js index 1c85f5dcbc9..1861ba564e7 100644 --- a/pages/doc-components/IndexHero.js +++ b/pages/doc-components/IndexHero.js @@ -10,7 +10,7 @@ const IndexHero = () => ( Primer Components - + v{version} diff --git a/src/__tests__/Heading.js b/src/__tests__/Heading.js index 923fbdd8704..67236189de5 100644 --- a/src/__tests__/Heading.js +++ b/src/__tests__/Heading.js @@ -17,6 +17,12 @@ const theme = { normal: 1.5, condensed: 1.25, condensedUltra: 1 + }, + fontWeights: { + light: '300', + normal: '400', + semibold: '500', + bold: '600' } } @@ -34,8 +40,16 @@ describe('Heading', () => { }) it('respects fontWeight', () => { - expect(render()).toHaveStyleRule('font-weight', 'bold') - expect(render()).toHaveStyleRule('font-weight', 'normal') + expect(render()).toHaveStyleRule('font-weight', theme.fontWeights.bold) + expect(render()).toHaveStyleRule( + 'font-weight', + theme.fontWeights.normal + ) + expect(render()).toHaveStyleRule( + 'font-weight', + theme.fontWeights.semibold + ) + expect(render()).toHaveStyleRule('font-weight', theme.fontWeights.light) }) it('respects lineHeight', () => { diff --git a/src/__tests__/Text.js b/src/__tests__/Text.js index 597cd12f485..64dc55e179f 100644 --- a/src/__tests__/Text.js +++ b/src/__tests__/Text.js @@ -41,8 +41,8 @@ describe('Text', () => { }) it('respects fontWeight', () => { - expect(render()).toHaveStyleRule('font-weight', 'bold') - expect(render()).toHaveStyleRule('font-weight', 'normal') + expect(render()).toHaveStyleRule('font-weight', '600') + expect(render()).toHaveStyleRule('font-weight', '400') }) it('respects lineHeight', () => { diff --git a/src/theme.js b/src/theme.js index 08831033222..b7b26451cf3 100644 --- a/src/theme.js +++ b/src/theme.js @@ -47,6 +47,12 @@ const theme = { ]), mono: fontStack(['SFMono-Regular', 'Consolas', 'Liberation Mono', 'Menlo', 'Courier', 'monospace']) }, + fontWeights: { + light: 300, + normal: 400, + semibold: 500, + bold: 600 + }, colors, borders: [0, '1px solid'], fontSizes,