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

Effect SDK V2.0 #113

Merged
merged 559 commits into from
May 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
559 commits
Select commit Hold shift + click to select a range
1c30919
Merge pull request #105 from effectai/sdk-v2-refactor
jeisses Apr 9, 2024
3770131
fix vaccount error, payment flow fixes
Jeffrieh Apr 10, 2024
0df7f8e
Merge branch 'sdk-v2-refactor' into sdk-v2
Jeffrieh Apr 10, 2024
f227629
yarn write prettier
Jeffrieh Apr 12, 2024
3c24909
add changesets CI
Jeffrieh Apr 12, 2024
c59e3a2
add package manager from bun to yarn
Jeffrieh Apr 12, 2024
c4c536c
fix replace ci use command to run
Jeffrieh Apr 12, 2024
f40956b
make getCampaign paginatable
Jeffrieh Apr 15, 2024
26868b8
remove upper bound
Jeffrieh Apr 16, 2024
a4a141a
replace yarn with bun, use biome instead of prettier+eslint
Jeffrieh Apr 16, 2024
d3dcca3
fix atomic asset types
Jeffrieh Apr 16, 2024
1b92334
biome check
Jeffrieh Apr 16, 2024
703e8fb
prune README, remove eslintrc
Jeffrieh Apr 16, 2024
8ecda60
add docs & examples
Jeffrieh Apr 16, 2024
dddff68
add example documentation
Jeffrieh Apr 16, 2024
d5222f7
Refactor: Convert function parameters from positional to object-based
Jeffrieh Apr 16, 2024
9325a1a
Remove console log
Jeffrieh Apr 16, 2024
332b73e
add empty doc files
Jeffrieh Apr 16, 2024
e7a6f6e
update getCampaigns example
Jeffrieh Apr 16, 2024
10379f7
add reservations_done and total_submissions to campaign type
laurensV Apr 16, 2024
2410b64
add getAccTaskIdx
laurensV Apr 16, 2024
45447c1
add auto generated types
Jeffrieh Apr 17, 2024
c523dfa
add serialized type
Jeffrieh Apr 17, 2024
d449bd9
retrieve all acctaskidx for a user and getReserveations per campaign …
laurensV Apr 17, 2024
b8c092a
add auto generated types fix
Jeffrieh Apr 18, 2024
e816aed
Merge branch 'dev' of github.com:effectai/effect-js into dev
Jeffrieh Apr 18, 2024
282dad0
add campaign info type
Jeffrieh Apr 18, 2024
df3cfd7
fix types, fix custom fetch in client
Jeffrieh Apr 19, 2024
0323104
Fix getPrice method
djmbritt Apr 23, 2024
86183ac
Add ClientOpts info
djmbritt Apr 23, 2024
8f1ef83
Rename files to use CamelCases
djmbritt Apr 23, 2024
4a844d0
Add compatibility info
djmbritt Apr 23, 2024
dbb5657
Remove migration link
djmbritt Apr 23, 2024
0202103
Fix getDefiBoxPair fetch method
djmbritt Apr 23, 2024
8109805
Use window.fetch or fetch for getDefiBocPair
djmbritt Apr 24, 2024
03ac5fc
Use include biome for test folder
djmbritt Apr 24, 2024
486efdd
Set up create test client helper
djmbritt Apr 24, 2024
2a212a2
test client setup
djmbritt Apr 24, 2024
32323c4
Update getting started docs with first draft
djmbritt Apr 24, 2024
322eaf6
Add getVAccounts test
djmbritt Apr 24, 2024
421104e
Merge branch 'devdocs' of github.com:effectai/effect-js into devdocs
djmbritt Apr 24, 2024
a6abb19
Fix link
djmbritt Apr 24, 2024
39b9439
Use bun test instead of vitest
djmbritt Apr 24, 2024
a83e4c3
Create vaccount test
djmbritt Apr 24, 2024
8083303
Update package.json, add coverage script, rm vitest
djmbritt Apr 24, 2024
5a14b8a
Move test files into src/ folder
djmbritt Apr 24, 2024
5dd95b1
Add .env files, use bun env var config
djmbritt Apr 24, 2024
ea489d7
Move helper to testhelper.ts
djmbritt Apr 24, 2024
4bd6030
Use bun env config, and refactor network env check
djmbritt Apr 24, 2024
acfcf46
Add info to readme about .env
djmbritt Apr 24, 2024
db9d494
Refactor to use testhelper.ts
djmbritt Apr 24, 2024
8ac08bb
Destructure env vars, and rename env vars
djmbritt Apr 24, 2024
e45c9f7
Exclude test files from build tsconfig
djmbritt Apr 24, 2024
0e1cd15
Rm console.debug
djmbritt Apr 24, 2024
b9b8cb4
Add EfxMainnetConfig contracts
djmbritt Apr 25, 2024
0e5b1dc
Add test file for getAccountAssets
djmbritt Apr 26, 2024
697175e
Use testnet / mainnet test for getVaccounts
djmbritt Apr 26, 2024
0186f8b
Add test getAccountById should throw error
djmbritt Apr 26, 2024
66bc738
Use process.env
djmbritt Apr 26, 2024
8261e20
Log wich network is used for test
djmbritt Apr 26, 2024
5bc23e7
Add documentation for client.ts
djmbritt Apr 26, 2024
a14f597
Fix gettingStarted guide
djmbritt Apr 26, 2024
7cafe65
Add documentation for createAccount.ts
djmbritt Apr 27, 2024
0e404f3
Clean up and use config for token symbol
djmbritt Apr 27, 2024
beb8813
Add createAccount.test.ts
djmbritt Apr 27, 2024
814e061
Use full example for getting started guide
djmbritt Apr 27, 2024
8af368c
Rename destructure parameters for creating Session
djmbritt Apr 28, 2024
e75d467
Add introduction
djmbritt Apr 28, 2024
b0dc14d
Add types buildSwapActionArgs and swapArgs
djmbritt Apr 29, 2024
6fbfddd
Add token.test.ts
djmbritt Apr 29, 2024
64bf7b1
add projectile to gitignore
Jeffrieh Apr 29, 2024
1d922e9
Change testHelper to use both testnet and mainnet env config
djmbritt Apr 29, 2024
95f9e65
Update client.test.ts to test both testnet and mainnet config
djmbritt Apr 29, 2024
758a1aa
Test getAccountAssets
djmbritt Apr 29, 2024
c2e11b2
Test getAccountAssets
djmbritt Apr 29, 2024
7889744
Use an enum for swap parameters
djmbritt Apr 29, 2024
0deb77e
Flesh out introduction
djmbritt Apr 29, 2024
c2a035d
Add test for token swapping
djmbritt Apr 29, 2024
b1e8894
Change parameter for testClientSession
djmbritt Apr 29, 2024
067b034
Formatting for getprice.ts
djmbritt Apr 29, 2024
91d5334
Fix merge error
djmbritt Apr 29, 2024
c30faa8
change types
Jeffrieh Apr 30, 2024
4bcdc3c
fix swap actions
Jeffrieh Apr 30, 2024
8c0e26a
fix verify
Jeffrieh Apr 30, 2024
0f81126
fix verify
Jeffrieh Apr 30, 2024
84edd49
remove dash from CI
Jeffrieh Apr 30, 2024
ddca5be
Add docs for getBalance
djmbritt Apr 30, 2024
b0f830a
formatting
Jeffrieh Apr 30, 2024
77e226f
fix CI
Jeffrieh Apr 30, 2024
27286b6
add scripts and docs to biome ignore
Jeffrieh Apr 30, 2024
bd3d6f3
setup bun
Jeffrieh Apr 30, 2024
4bc0acd
chore: format
Jeffrieh Apr 30, 2024
45bcc58
add preset big lib
Jeffrieh Apr 30, 2024
4097946
Merge branch 'dev' of github.com:effectai/effect-js into dev
Jeffrieh Apr 30, 2024
15bda78
Add deposit test
djmbritt Apr 30, 2024
7fddc02
Tighten types for Session
djmbritt Apr 30, 2024
d318665
fix swap contract
Jeffrieh Apr 30, 2024
3aa8ba2
Use jungle for deposit test
djmbritt Apr 30, 2024
6c36163
Add comment on how to powerup
djmbritt Apr 30, 2024
65a733a
Use swap update from Jeff
djmbritt Apr 30, 2024
9f355a4
Update Test
djmbritt Apr 30, 2024
32f1aa5
Merge branch 'dev' into devdocs
djmbritt Apr 30, 2024
292a47d
Clean up imports for client
djmbritt Apr 30, 2024
f51e241
Add SwapArgs type
djmbritt Apr 30, 2024
973505e
Update token.test.ts with SwapArgs and add should fail when amount is…
djmbritt Apr 30, 2024
e72f3c5
Update lockfile
djmbritt Apr 30, 2024
f512676
chore: format
djmbritt Apr 30, 2024
88662b1
Add getCampaignById test
djmbritt May 1, 2024
1bd37b3
Merge branch 'devdocs' of github.com:effectai/effect-js into devdocs
djmbritt May 1, 2024
7e95aed
Add getAllCampaigns, createCampaign, getCampaigns test
djmbritt May 1, 2024
c681c7a
Add getAllCampaigns, createCampaign, getCampaigns test
djmbritt May 1, 2024
ed8bc76
Add createCampaign docs
djmbritt May 1, 2024
980f045
Merge branch 'devdocs' of github.com:effectai/effect-js into devdocs
djmbritt May 1, 2024
8df5d79
add pages to docs
Jeffrieh May 1, 2024
c8911f4
fix tests
Jeffrieh May 1, 2024
b7a7514
chore: format
Jeffrieh May 1, 2024
3cf46c1
fix tests
Jeffrieh May 1, 2024
2585fac
Remove unused import
Jeffrieh May 1, 2024
d1bcecf
rename import
Jeffrieh May 1, 2024
47d73e7
fix swap test
Jeffrieh May 1, 2024
faa6014
Merge branch 'dev' of github.com:effectai/effect-js into dev
Jeffrieh May 1, 2024
ad9ec94
fix build errors
Jeffrieh May 1, 2024
0ca5ad6
chore: format
Jeffrieh May 1, 2024
f543848
skip bundle file reporting for now
Jeffrieh May 1, 2024
5f73773
Merge branch 'dev' of github.com:effectai/effect-js into dev
Jeffrieh May 1, 2024
1e7c220
change package name
Jeffrieh May 1, 2024
131563c
feat: enable createClient to also pass a Session
Jeffrieh May 2, 2024
0ed215d
fix: assert that network is set
Jeffrieh May 2, 2024
6310d13
fix tests
Jeffrieh May 2, 2024
304b2ab
fix: remove some client tests
Jeffrieh May 2, 2024
66c4efa
Add permissionLevel and fix env vars names
djmbritt May 2, 2024
9e9e826
Fix name for network property in testClientSession
djmbritt May 2, 2024
0fd401f
Add transact function return type
djmbritt May 2, 2024
b63f165
Add transfer.test.ts
djmbritt May 2, 2024
cd28d05
Fix quantity type for transfer method
djmbritt May 3, 2024
16ebdec
Add transfer.test.ts
djmbritt May 3, 2024
cfcd85c
fix: remove weak types, instead generate them from ABI
Jeffrieh May 3, 2024
8b37f7e
Add getPendingPayments.test.ts
djmbritt May 3, 2024
9a905ac
Merge branch 'dev' into dev_test
djmbritt May 3, 2024
e241a62
Recreate src/ structure as docs
djmbritt May 4, 2024
329a1ea
Rename env vars
djmbritt May 4, 2024
2199e1e
Add `ipfsCIDToHexString` function
jeisses May 4, 2024
89129f3
Merge branch 'dev' of github.com:effectai/effect-js into dev
jeisses May 4, 2024
75974c6
chore: format
jeisses May 4, 2024
13f1806
Implement new submission data format using bytes
jeisses May 4, 2024
2be27e7
Merge branch 'dev' of github.com:effectai/effect-js into dev
jeisses May 4, 2024
0619d90
chore: format
jeisses May 4, 2024
dd6f94e
Merge branch 'dev' into dev_test
djmbritt May 5, 2024
af36725
clean up camapigns docs
djmbritt May 5, 2024
106c6fb
fix: export account type
Jeffrieh May 5, 2024
8705bcf
feat: include & re-export wharfkit session
Jeffrieh May 5, 2024
9270718
fix: add @wharfkit/wallet-plugin-privakey to dev deps
Jeffrieh May 5, 2024
669c7e8
Merge branch 'dev' into dev_test
djmbritt May 5, 2024
631a703
Add createCampaign, getCampaignById and getCamapigns docs
djmbritt May 6, 2024
6fc45c4
fix: rm cached vocs config data
Jeffrieh May 6, 2024
f4a030f
revert package json
Jeffrieh May 6, 2024
4288a66
Update biome json to include docs/
djmbritt May 7, 2024
0a4411a
Update sidebar with sdk api items
djmbritt May 7, 2024
80d1a0d
Use kebab case for files in pages/
djmbritt May 7, 2024
4ee23ea
Use kebab case for sidebar items
djmbritt May 7, 2024
bb0e4ee
Update create-campaign docs
djmbritt May 7, 2024
b292640
Update getPrice doc
djmbritt May 7, 2024
480b62b
Add getBalance docs
djmbritt May 7, 2024
3378384
Add getBalance docs
djmbritt May 7, 2024
e9a8c97
Merge branch 'dev_test' of github.com:effectai/effect-js into dev_test
djmbritt May 7, 2024
a5ec36b
Add swap documentation
djmbritt May 7, 2024
5e40649
Add transact result page to glossary
djmbritt May 8, 2024
1ebbc29
Add asset docs
djmbritt May 8, 2024
edc26db
clean up get-balance and swap
djmbritt May 8, 2024
81d267e
Use NameType instead of Name
djmbritt May 10, 2024
631fcac
Fix link to transfer docs
djmbritt May 10, 2024
c639cf3
Clean up client.test.ts
djmbritt May 10, 2024
c062c98
Update test script
djmbritt May 10, 2024
a091600
clean up session.ts
djmbritt May 10, 2024
dd0a27b
Await on `createClient()` and clean up
djmbritt May 10, 2024
9ed33dc
use `await createClient()` and clean up
djmbritt May 10, 2024
b4a66a1
Update generated types
djmbritt May 10, 2024
7fdc26d
Update get-balance docs and init transfer docs
djmbritt May 10, 2024
8dcdcc1
Merge branch 'dev' into dev_test
djmbritt May 10, 2024
30106a2
Add test files
djmbritt May 10, 2024
bd60500
Add claim.test.ts
djmbritt May 10, 2024
951be62
Fix getAvatar function signature with getAvatarArgs
djmbritt May 10, 2024
7da3801
fix: export proper getAvatar function
djmbritt May 10, 2024
731bd6c
todo: getAvatar, getAsset are not working as expected
djmbritt May 10, 2024
4edc84f
implement payout.test.ts
djmbritt May 10, 2024
20955e3
Fix: use ExtendedAssetType instead of ExtendedAsset
djmbritt May 10, 2024
734badb
Add test to withdraw.test.ts
djmbritt May 10, 2024
e566b82
Add return type to `getOrCreate()` function signature
djmbritt May 10, 2024
d63b5a4
Add getOrCreate.test.ts
djmbritt May 10, 2024
ca4f195
Fix efx symbol for createBatch function
djmbritt May 10, 2024
fbf5502
Add createBatch.test.ts
djmbritt May 10, 2024
4c8f1cd
Add getBatch.test.ts
djmbritt May 10, 2024
b23eb02
Add getTaskIdx.test.ts
djmbritt May 10, 2024
2eedec9
Add getForceSettings.test.ts
djmbritt May 10, 2024
4b92a67
Add getRepititions.test.ts
djmbritt May 10, 2024
67af03a
Add getRepitionsArgs to getRepitions function
djmbritt May 10, 2024
cc7e1cd
Update getSubmissions return value
djmbritt May 10, 2024
46128da
Add getSubmission.test.ts
djmbritt May 10, 2024
1704f63
Add getTask.test.ts
djmbritt May 10, 2024
8bd5326
Clean up getReservations.ts, add return types, return object instead …
djmbritt May 10, 2024
ff9204b
add getReservations.test.ts
djmbritt May 10, 2024
d297b42
Add reserveTAsk.test.ts
djmbritt May 10, 2024
43498ab
Add submitTask.test.ts
djmbritt May 10, 2024
47d3324
Add test:only to package.json scripts
djmbritt May 10, 2024
5024bab
Clean up
djmbritt May 10, 2024
e8680d2
Update return type for getAccount
djmbritt May 11, 2024
7a3051d
Update getting-started page and use snippets
djmbritt May 11, 2024
0507117
Update campaign docs
djmbritt May 12, 2024
e0e8b52
Update get-balance docs
djmbritt May 12, 2024
d9c7236
Update get-price docs
djmbritt May 12, 2024
5534358
Update swap
djmbritt May 12, 2024
9898369
Add swapArgs to index export
djmbritt May 12, 2024
bd063fb
Update docs:dev script with `bun link`
djmbritt May 12, 2024
5c123cd
Add TODO for swap function
djmbritt May 12, 2024
87fbdf8
Update package.json dependency with link to local `@effectai/sdk`
djmbritt May 12, 2024
68400c3
Use code snippets for getting started guide
djmbritt May 12, 2024
c5f7252
Use code snippets for create campaign guide
djmbritt May 12, 2024
e7753f5
Add tasks code snippets
djmbritt May 12, 2024
e6d0a6d
Add code snippet for create account
djmbritt May 12, 2024
80d2481
Add claim to docs
djmbritt May 12, 2024
e157602
Add payout docs
djmbritt May 12, 2024
31295cd
Fix link to glossary/transaction-result
djmbritt May 12, 2024
3f6fe49
Update quantity for withdraw() to use number instead of ExtendedAsset…
djmbritt May 13, 2024
b6783fa
Add withdraw docs
djmbritt May 13, 2024
e24b1ef
Update transfer docs to use snippets
djmbritt May 13, 2024
5485254
Add deposit docs
djmbritt May 13, 2024
0e2c69b
Add create-account docs
djmbritt May 13, 2024
27756a4
Add get vaccounts doc
djmbritt May 13, 2024
76aa0fc
Add get pending paymets doc
djmbritt May 13, 2024
e4fa0fe
Add get pending paymets doc
djmbritt May 13, 2024
6d85a06
Merge branch 'dev_test' of github.com:effectai/effect-js into dev_test
djmbritt May 13, 2024
f6f20e5
chore: format
djmbritt May 13, 2024
f99d547
chore: convert to monorepo
Jeffrieh May 13, 2024
ebbdb83
chore: add dist to exclude
Jeffrieh May 13, 2024
89ebb72
chore: move some package.json contents
Jeffrieh May 13, 2024
93fa132
fix: tweak & fix doc pages
Jeffrieh May 14, 2024
e18631b
chore: format
Jeffrieh May 14, 2024
2d136e3
Update package.json scripts to link local sdk
djmbritt May 14, 2024
ed9d3b2
Update package.json scripts to link local sdk
djmbritt May 14, 2024
5da76f8
Merge branch 'dev' of github.com:effectai/effect-js into dev
djmbritt May 14, 2024
a013286
rm @effectai/sdk
djmbritt May 14, 2024
8f19fea
rm @effectai/sdk
djmbritt May 14, 2024
95b1a5f
Merge branch 'dev' of github.com:effectai/effect-js into dev
djmbritt May 14, 2024
a84736e
chore: format
djmbritt May 14, 2024
c974ccb
remove async from createClient
Jeffrieh May 15, 2024
c27de6f
fix typo
Jeffrieh May 15, 2024
4bed0bc
remove link from scripts
Jeffrieh May 15, 2024
086f6be
chore: format
Jeffrieh May 15, 2024
9335a61
chore: remove deploy docs CI script, do it manually for now
Jeffrieh May 15, 2024
70149b4
docs: change sidebar order for docs
Jeffrieh May 15, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
11 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/config@3.0.0/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "restricted",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
5 changes: 5 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
PERMISSION=active
NETWORK_NAME=mainnet
ACTOR=eosaccountname
PRIVATE_KEY=private_key_here
PUBLIC_KEY=public_key_here
22 changes: 0 additions & 22 deletions .eslintrc.json

This file was deleted.

12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "monthly"
open-pull-requests-limit: 0

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
70 changes: 70 additions & 0 deletions .github/workflows/changesets.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Changesets
on:
push:
branches: [main, rc]
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
verify:
name: Verify
uses: ./.github/workflows/verify.yml
secrets: inherit

changesets:
name: Create version pull request
runs-on: ubuntu-latest
timeout-minutes: 5

steps:
- name: Clone repository
uses: actions/checkout@v4
with:
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0

- uses: oven-sh/setup-bun@v1

- name: Install dependencies
run: bun install --frozen-lockfile

- name: Create Version Pull Request
uses: changesets/action@v1
with:
commit: "chore: version package"
title: "chore: version package"
version: bun changeset:version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# release:
# name: Release
# needs: verify
# runs-on: ubuntu-latest
# timeout-minutes: 5
# permissions:
# contents: write
# id-token: write

# steps:
# - name: Clone repository
# uses: actions/checkout@v4

# - uses: oven-sh/setup-bun@v1

# - name: Install dependencies
# run: bun install --frozen-lockfile

# - name: Publish to NPM
# uses: changesets/action@v1
# with:
# createGithubReleases: ${{ github.ref == 'refs/heads/main' }}
# publish: bun changeset:publish
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
# # https://docs.npmjs.com/generating-provenance-statements
# NPM_CONFIG_PROVENANCE: true
49 changes: 0 additions & 49 deletions .github/workflows/ci.yml

This file was deleted.

2 changes: 0 additions & 2 deletions .github/workflows/project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,3 @@ jobs:
project-url: https://github.com/orgs/effectai/projects/6 # bounty board project
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
labeled: bounty


34 changes: 34 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Pull request
on:
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
verify:
name: Verify
uses: ./.github/workflows/verify.yml
secrets: inherit

# size:
# name: Size
# runs-on: ubuntu-latest
# timeout-minutes: 5

# steps:
# - name: Clone repository
# uses: actions/checkout@v4

# - name: Setup Bun
# uses: oven-sh/setup-bun@v1

# - name: Install dependencies
# run: bun install --frozen-lockfile

# - name: Report bundle size
# uses: andresz1/size-limit-action@master
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# package_manager: bun
48 changes: 48 additions & 0 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Verify
on:
workflow_call:
workflow_dispatch:

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
timeout-minutes: 5

steps:
- name: Clone repository
uses: actions/checkout@v4

- name: Setup Bun
uses: oven-sh/setup-bun@v1

- name: Install dependencies
run: bun install --frozen-lockfile

- name: Lint code
run: bun format && bun lint

- uses: stefanzweifel/git-auto-commit-action@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
commit_message: "chore: format"
commit_user_name: "github-actions[bot]"

build:
name: Build
needs: lint
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Clone repository
uses: actions/checkout@v4

- name: Setup Bun
uses: oven-sh/setup-bun@v1

- name: Install dependencies
run: bun install --frozen-lockfile

- name: Build
run: bun run build