Skip to content

Commit

Permalink
CI improvements (#131)
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenpetryk authored Sep 30, 2023
1 parent f0b5392 commit d7d0b50
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 109 deletions.
90 changes: 20 additions & 70 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,118 +7,68 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- uses: pnpm/action-setup@v2
with:
version: 7
run_install: false
- id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
version: 8
- uses: actions/setup-node@v3
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
node-version: 20
cache: "pnpm"
- run: pnpm install
- run: pnpm build

tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- uses: pnpm/action-setup@v2
with:
version: 7
run_install: false
- id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
version: 8
- uses: actions/setup-node@v3
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
node-version: 20
cache: "pnpm"
- run: pnpm install
- run: pnpm test:unit

check-format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- uses: pnpm/action-setup@v2
with:
version: 7
run_install: false
- id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
version: 8
- uses: actions/setup-node@v3
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
node-version: 20
cache: "pnpm"
- run: pnpm install
- run: pnpm format:check

lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- uses: pnpm/action-setup@v2
with:
version: 7
run_install: false
- id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
version: 8
- uses: actions/setup-node@v3
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
node-version: 20
cache: "pnpm"
- run: pnpm install
- run: pnpm lint

tsc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- uses: pnpm/action-setup@v2
with:
version: 7
run_install: false
- id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
version: 8
- uses: actions/setup-node@v3
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
node-version: 20
cache: "pnpm"
- run: pnpm install
- run: pnpm tsc
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ dist
docs/.cache
docs/.next
docs/public

pnpm-lock.yaml
.api-report
72 changes: 36 additions & 36 deletions api-extractor.json
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
{
"mainEntryPointFilePath": "<projectFolder>/build/types/src/index.d.ts",
"bundledPackages": [],
"apiReport": {
"enabled": true,
"reportFileName": "mafs.api.md",
"reportFolder": ".api-report",
"reportTempFolder": ".api-report/temp"
},
"dtsRollup": {
"enabled": true,
"untrimmedFilePath": "<projectFolder>/build/index.d.ts"
},
"docModel": {
"enabled": false
},
"tsdocMetadata": {
"enabled": false
},
"messages": {
"extractorMessageReporting": {
"default": {
"logLevel": "warning"
},
"ae-missing-release-tag": {
"logLevel": "none"
}
},
"tsdocMessageReporting": {
"default": {
"logLevel": "warning"
}
}
},
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json"
}
{
"mainEntryPointFilePath": "<projectFolder>/build/types/src/index.d.ts",
"bundledPackages": [],
"apiReport": {
"enabled": true,
"reportFileName": "mafs.api.md",
"reportFolder": ".api-report",
"reportTempFolder": ".api-report/temp"
},
"dtsRollup": {
"enabled": true,
"untrimmedFilePath": "<projectFolder>/build/index.d.ts"
},
"docModel": {
"enabled": false
},
"tsdocMetadata": {
"enabled": false
},
"messages": {
"extractorMessageReporting": {
"default": {
"logLevel": "warning"
},
"ae-missing-release-tag": {
"logLevel": "none"
}
},
"tsdocMessageReporting": {
"default": {
"logLevel": "warning"
}
}
},
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json"
}
2 changes: 1 addition & 1 deletion e2e/generated-vrt.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// THIS FILE IS GENERATED BY ./scripts/testgen.mts
// THIS FILE IS GENERATED BY ./scripts/testgen.ts

import { expect, test, ComponentFixtures } from "@playwright/experimental-ct-react"
import { Page } from "@playwright/test"
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"module": "build/index.mjs",
"types": "build/index.d.ts",
"type": "module",
"packageManager": "[email protected]",
"files": [
"build/",
"core.css",
Expand All @@ -23,8 +24,8 @@
"build": "node --loader ts-node/esm scripts/build.ts",
"api-report:update": "pnpm tsc && api-extractor run --local",
"lint": "eslint . --ext .js,.jsx,.ts,.tsx",
"format": "prettier --write \"**/*.{js,jsx,ts,tsx,css,md}\"",
"format:check": "prettier --check \"**/*.{js,jsx,ts,tsx,css,md}\"",
"format": "prettier --write .",
"format:check": "prettier --check .",
"prepublishOnly": "pnpm test && pnpm lint && pnpm build"
},
"devDependencies": {
Expand Down

1 comment on commit d7d0b50

@vercel
Copy link

@vercel vercel bot commented on d7d0b50 Sep 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.