Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: simplify ci config and bump some deps version #2770

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 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
2 changes: 1 addition & 1 deletion .github/workflows/test-canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install
uses: ./.github/workflows/install
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ jobs:
e2e:
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/playwright:v1.34.3-focal
image: mcr.microsoft.com/playwright:v1.37.1-focal
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install
uses: ./.github/workflows/install
Expand Down
44 changes: 5 additions & 39 deletions .github/workflows/trigger-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,54 +17,25 @@ on:
- minor
- major

secrets:
RELEASE_BOT_GITHUB_TOKEN:
required: true

name: Trigger Release

env:
PNPM_VERSION: 8.4.0
SEMVER_TYPE: ${{ github.event.inputs.semverType }}
RELEASE_TYPE: ${{ github.event.inputs.releaseType }}

jobs:
start:
runs-on: ubuntu-latest

environment: release-${{ github.event.inputs.releaseType }}-${{ github.event.inputs.semverType }}
steps:
- name: Setup node
uses: actions/setup-node@v3
if: ${{ steps.docs-change.outputs.docsChange == 'nope' }}
with:
node-version: 18
check-latest: true

- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 10
token: ${{ secrets.RELEASE_BOT_GITHUB_TOKEN }}

- run: npm i -g pnpm@${PNPM_VERSION}

- id: get-store-path
run: echo STORE_PATH=$(pnpm store path) >> $GITHUB_OUTPUT

- uses: actions/cache@v3
timeout-minutes: 5
id: cache-pnpm-store
with:
path: ${{ steps.get-store-path.outputs.STORE_PATH }}
key: pnpm-store-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
pnpm-store-
pnpm-store-${{ hashFiles('pnpm-lock.yaml') }}

- run: pnpm install

- run: |
- name: Install
uses: ./.github/workflows/install
- name: Test
run: |
pnpm run-all-checks
pnpm clean
pnpm build
Expand All @@ -80,11 +51,6 @@ jobs:
node ./scripts/bump-next-version.js

- name: Git push
env:
RELEASE_BOT_GITHUB_TOKEN: ${{ secrets.RELEASE_BOT_GITHUB_TOKEN }}
run: |
git push origin main
git push origin --tags



36 changes: 18 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
"build": "pnpm build-package _internal && pnpm build-package core && pnpm build-package infinite && pnpm build-package immutable && pnpm build-package mutation && pnpm build-package subscription",
"build:e2e": "pnpm next build e2e/site",
"build-package": "bunchee --cwd",
"attw": "attw --pack",
"attw": "attw --pack --ignore-rules cjs-only-exports-default",
Copy link
Member

Choose a reason for hiding this comment

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

why we need to ignore this rule?

can we also run attw in the test:build process on ci so it's get covered on CI?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It has already been included in CI.

We need to ignore this rule because SWR use default exports which could cause problems. https://github.com/arethetypeswrong/arethetypeswrong.github.io/blob/main/docs/problems/CJSOnlyExportsDefault.md#-cjs-default-export

"types:check": "pnpm -r run types:check",
"prepublishOnly": "pnpm clean && pnpm build",
"publish-beta": "pnpm publish --tag beta",
Expand All @@ -113,32 +113,32 @@
]
},
"devDependencies": {
"@arethetypeswrong/cli": "^0.7.0",
"@playwright/test": "^1.34.3",
"@arethetypeswrong/cli": "^0.10.1",
"@playwright/test": "^1.37.1",
"@swc/core": "^1.3.62",
"@swc/jest": "0.2.26",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/jest-dom": "^6.1.2",
"@testing-library/react": "^14.0.0",
"@type-challenges/utils": "0.1.1",
"@types/jest": "^29.5.2",
"@types/node": "^20.2.5",
"@types/react": "^18.2.8",
"@types/use-sync-external-store": "^0.0.3",
"@typescript-eslint/eslint-plugin": "5.59.8",
"@typescript-eslint/parser": "5.59.8",
"bunchee": "3.6.0",
"eslint": "8.42.0",
"eslint-config-prettier": "8.8.0",
"eslint-plugin-jest-dom": "5.0.1",
"eslint-plugin-react": "7.32.2",
"@types/use-sync-external-store": "^0.0.4",
"@typescript-eslint/eslint-plugin": "6.6.0",
"@typescript-eslint/parser": "6.6.0",
"bunchee": "3.6.1",
"eslint": "8.48.0",
"eslint-config-prettier": "9.0.0",
"eslint-plugin-jest-dom": "5.1.0",
"eslint-plugin-react": "7.33.2",
"eslint-plugin-react-hooks": "4.6.0",
"eslint-plugin-testing-library": "5.11.0",
"eslint-plugin-testing-library": "6.0.1",
"husky": "8.0.3",
"jest": "29.5.0",
"jest-environment-jsdom": "29.5.0",
"lint-staged": "13.2.2",
"next": "^13.4.4",
"prettier": "2.8.8",
"jest": "29.6.4",
"jest-environment-jsdom": "29.6.4",
"lint-staged": "14.0.1",
"next": "^13.4.19",
"prettier": "3.0.3",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-error-boundary": "^4.0.9",
Expand Down
Loading
Loading