Skip to content

Commit

Permalink
attw (#422)
Browse files Browse the repository at this point in the history
* Setup attw

* Fix typo

* Next try

* Fix typo

* EOF

* I love bash

* Add missed putting

* Improve format

* format

* Do not use generateExportsField
  • Loading branch information
igorkamyshev committed Dec 10, 2023
1 parent 20179e7 commit 969e8f7
Show file tree
Hide file tree
Showing 13 changed files with 243 additions and 38 deletions.
21 changes: 0 additions & 21 deletions .github/workflows/changes.yml

This file was deleted.

66 changes: 64 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: CI

on: push
on: pull_request

jobs:
checks:
code:
runs-on: ubuntu-latest

steps:
Expand All @@ -18,5 +18,67 @@ jobs:
- run: pnpm test
- run: pnpm test:types
- run: pnpm lint
pkg:
runs-on: ubuntu-latest

steps:
- name: Find comment about previous analysis
uses: peter-evans/find-comment@v1
id: find_comment
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'
body-includes: ATTW
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
- uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: 'pnpm'
- run: pnpm install --frozen-lockfile
- run: pnpm build
- run: pnpm size
- name: Validate typings of all packages
id: typelint
run: echo "result<<EOF"$'\n'"$(pnpm node ./tools/scripts/typelint.mjs)"$'\n'EOF >> $GITHUB_OUTPUT
# In case of absence of the comment we will create it with information about latest analysis
- name: Create comment
if: steps.find_comment.outputs.comment-id == ''
uses: peter-evans/create-or-update-comment@v1
with:
issue-number: ${{ github.event.pull_request.number }}
body: |
# ATTW
<details>
<summary>Analysis</summary>
${{ steps.typelint.outputs.result }}
</details>
# Otherwise we will update it with information about latest analysis
- name: Update comment
if: steps.find_comment.outputs.comment-id != ''
uses: peter-evans/create-or-update-comment@v1
with:
edit-mode: replace
comment-id: ${{ steps.find_comment.outputs.comment-id }}
body: |
# ATTW
<details>
<summary>Analysis</summary>
${{ steps.typelint.outputs.result }}
</details>
changes:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: pnpm/action-setup@v2
- uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: 'pnpm'
- run: pnpm install --frozen-lockfile
- run: pnpm lint:changes
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
},
"devDependencies": {
"@algolia/client-search": "^4.14.2",
"@arethetypeswrong/cli": "^0.13.3",
"@babel/core": "^7.18.6",
"@babel/preset-typescript": "~7.18.6",
"@changesets/cli": "^2.24.1",
Expand Down
3 changes: 1 addition & 2 deletions packages/atomic-router/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@
"assets": [],
"project": "packages/atomic-router/package.json",
"compiler": "swc",
"format": ["cjs", "esm"],
"generateExportsField": true
"format": ["cjs", "esm"]
}
},
"publish": {
Expand Down
3 changes: 1 addition & 2 deletions packages/core/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@
"assets": [],
"project": "packages/core/package.json",
"compiler": "swc",
"format": ["cjs", "esm"],
"generateExportsField": true
"format": ["cjs", "esm"]
}
},
"publish": {
Expand Down
3 changes: 1 addition & 2 deletions packages/io-ts/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@
"assets": [],
"project": "packages/io-ts/package.json",
"compiler": "swc",
"format": ["cjs", "esm"],
"generateExportsField": true
"format": ["cjs", "esm"]
}
},
"publish": {
Expand Down
3 changes: 1 addition & 2 deletions packages/solid/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@
"assets": [],
"project": "packages/solid/package.json",
"compiler": "swc",
"format": ["cjs", "esm"],
"generateExportsField": true
"format": ["cjs", "esm"]
}
},
"publish": {
Expand Down
3 changes: 1 addition & 2 deletions packages/superstruct/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@
"assets": [],
"project": "packages/superstruct/package.json",
"compiler": "swc",
"format": ["cjs", "esm"],
"generateExportsField": true
"format": ["cjs", "esm"]
}
},
"publish": {
Expand Down
3 changes: 1 addition & 2 deletions packages/typed-contracts/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@
"assets": [],
"project": "packages/typed-contracts/package.json",
"compiler": "swc",
"format": ["cjs", "esm"],
"generateExportsField": true
"format": ["cjs", "esm"]
}
},
"publish": {
Expand Down
3 changes: 1 addition & 2 deletions packages/zod/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@
"assets": [],
"project": "packages/zod/package.json",
"compiler": "swc",
"format": ["cjs", "esm"],
"generateExportsField": true
"format": ["cjs", "esm"]
}
},
"publish": {
Expand Down

0 comments on commit 969e8f7

Please sign in to comment.