Skip to content

Commit bfcdcbb

Browse files
authored
feat: github actions (#1)
1 parent 5d8c476 commit bfcdcbb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+4522
-2305
lines changed

.github/workflows/ci.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: ci
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
jobs:
10+
main:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: read
14+
packages: write
15+
steps:
16+
- uses: actions/checkout@v3
17+
with:
18+
fetch-depth: 0
19+
20+
- uses: nrwl/nx-set-shas@v3
21+
22+
- uses: pnpm/action-setup@v2
23+
with:
24+
version: 8
25+
26+
- name: Use Node.js
27+
uses: actions/setup-node@v3
28+
with:
29+
node-version: '18.x'
30+
cache: 'pnpm'
31+
registry-url: 'https://npm.pkg.github.com'
32+
scope: '@loopexchange-labs'
33+
34+
- name: Setup Go environment
35+
uses: actions/setup-go@v4
36+
with:
37+
go-version-file: 'packages/loopring-wasm/go.mod'
38+
cache-dependency-path: 'packages/loopring-wasm/go.sum'
39+
40+
- name: Add GOPATH/bin to path
41+
run: |
42+
echo "export PATH=$PATH:$(go env GOPATH)/bin" >> $GITHUB_ENV
43+
44+
- name: Setup TinyGo
45+
run: |
46+
cd $(mktemp -d)
47+
wget https://github.com/tinygo-org/tinygo/releases/download/v0.28.1/tinygo_0.28.1_amd64.deb
48+
sudo dpkg -i tinygo_0.28.1_amd64.deb
49+
50+
- name: Install dependencies
51+
run: pnpm install --frozen-lockfile
52+
53+
- run: pnpm exec nx format:check
54+
55+
- run: pnpm exec nx lint loopring-wasm
56+
- run: pnpm exec nx build loopring-wasm
57+
58+
- run: pnpm exec nx lint loopring-sdk
59+
- run: pnpm exec nx tsc loopring-sdk
60+
- run: pnpm exec nx test loopring-sdk --ci --code-coverage
61+
- run: pnpm exec nx build loopring-sdk

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# See http://help.github.com/ignore-files/ for more about ignoring files.
22

3+
packages/loopring-sdk/src/lib/bridge/*.wasm
4+
.vscode
5+
36
# compiled output
47
dist
58
tmp

.prettierignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
# Add files here to ignore them from prettier formatting
22
/dist
3-
/coverage
3+
/coverage
4+
/packages/loopring-sdk/src/lib/openapi
5+
pnpm-lock.yaml
6+
.vscode

nx.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"default": {
55
"runner": "nx/tasks-runners/default",
66
"options": {
7-
"cacheableOperations": ["build", "lint", "test", "e2e"]
7+
"cacheableOperations": []
88
}
99
}
1010
},

package.json

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,36 +5,34 @@
55
"scripts": {},
66
"private": true,
77
"dependencies": {
8-
"tslib": "^2.3.0"
8+
"tslib": "^2.6.2"
99
},
1010
"devDependencies": {
11-
"@nx/eslint-plugin": "16.7.4",
12-
"@nx/jest": "16.7.4",
13-
"@nx/js": "16.7.4",
14-
"@nx/linter": "16.7.4",
15-
"@nx/vite": "16.7.4",
16-
"@nx/workspace": "16.7.4",
11+
"@nx/eslint-plugin": "16.8.1",
12+
"@nx/jest": "16.8.1",
13+
"@nx/js": "16.8.1",
14+
"@nx/linter": "16.8.1",
15+
"@nx/vite": "16.8.1",
16+
"@nx/workspace": "16.8.1",
1717
"@openapitools/openapi-generator-cli": "^2.7.0",
18-
"@types/jest": "^29.4.0",
19-
"@types/node": "18.7.1",
20-
"@typescript-eslint/eslint-plugin": "^5.60.1",
21-
"@typescript-eslint/parser": "^5.60.1",
22-
"@vitest/ui": "~0.32.0",
18+
"@types/jest": "^29.5.4",
19+
"@types/node": "18.14.2",
20+
"@typescript-eslint/eslint-plugin": "^5.62.0",
21+
"@typescript-eslint/parser": "^5.62.0",
2322
"eslint": "~8.46.0",
2423
"eslint-config-prettier": "8.1.0",
25-
"jest": "^29.4.1",
24+
"jest": "^29.6.4",
2625
"jest-environment-jsdom": "^29.6.4",
27-
"jest-environment-node": "^29.4.1",
28-
"nx": "16.7.4",
29-
"prettier": "^2.6.2",
30-
"ts-jest": "^29.1.0",
26+
"jest-environment-node": "^29.6.4",
27+
"nx": "16.8.1",
28+
"prettier": "^2.8.8",
29+
"ts-jest": "^29.1.1",
3130
"ts-node": "10.9.1",
32-
"typescript": "~5.1.3",
33-
"verdaccio": "^5.0.4",
31+
"typescript": "~5.1.6",
32+
"verdaccio": "^5.26.2",
3433
"vite": "~4.3.9",
3534
"vite-plugin-dts": "~2.3.0",
36-
"vitest": "~0.32.0",
37-
"whatwg-fetch": "^3.6.17"
35+
"whatwg-fetch": "^3.6.18"
3836
},
3937
"nx": {
4038
"includedScripts": []

packages/loopring-sdk/.eslintrc.json

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,21 @@
1818
"files": ["*.json"],
1919
"parser": "jsonc-eslint-parser",
2020
"rules": {
21-
"@nx/dependency-checks": "error"
21+
"@nx/dependency-checks": [
22+
"error",
23+
{
24+
"ignoredDependencies": [
25+
"vite",
26+
"@nx/vite",
27+
"vite-plugin-dts",
28+
"whatwg-fetch"
29+
],
30+
"checkMissingDependencies": true,
31+
"checkObsoleteDependencies": true,
32+
"checkVersionMismatches": true,
33+
"ignoredFiles": ["{projectRoot}/vite.config.{js,ts,mjs,mts}"]
34+
}
35+
]
2236
}
2337
}
2438
]

0 commit comments

Comments
 (0)