Skip to content

Commit

Permalink
chore: update CI & jenkins
Browse files Browse the repository at this point in the history
  • Loading branch information
danisharora099 committed Oct 25, 2024
1 parent 14ce0a1 commit c853438
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 8 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ jobs:
experimental/rln-identity,
dogfooding,
message-monitor,
flush-notes
flush-notes,
buddybook
]
runs-on: ubuntu-latest
steps:
Expand All @@ -40,7 +41,12 @@ jobs:
working-directory: "examples/${{ matrix.example }}"

- name: build
run: npm run build
run: |
if [ "${{ matrix.example }}" == "buddybook" ]; then
npm run build:ci
else
npm run build
fi
working-directory: "examples/${{ matrix.example }}"

- name: test
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ This example uses Waku Relay to send and receive simple text messages.
- [website](https://lab.waku.org/experimental/relay-direct-rtc)
- Demonstrates: Relay over WebRTC.

### Buddychain App

- [code](examples/buddychain)
- [website](https://lab.waku.org/buddychain)
- Demonstrates: [Add a brief description of what the Buddychain app demonstrates]

# Continuous Integration

Expand Down
10 changes: 10 additions & 0 deletions ci/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,16 @@ pipeline {
stage('dogfooding') { steps { script { buildExample() } } }
stage('message-monitor') { steps { script { buildExample() } } }
stage('flush-notes') { steps { script { buildNextJSExample() } } }
stage('buddybook') {
steps {
script {
dir('examples/buddybook') {
sh 'npm install'
sh 'npm run build:ci'
}
}
}
}
}
}

Expand Down
15 changes: 9 additions & 6 deletions examples/buddybook/package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"name": "buddybook",
"private": true,
"version": "0.0.0",
"version": "0.1.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc -b && vite build",
"build:ci": "vite build",
"lint": "eslint .",
"preview": "vite preview"
},
Expand Down Expand Up @@ -38,20 +39,22 @@
"zod": "^3.22.4"
},
"devDependencies": {
"@eslint/js": "^9.11.1",
"@types/node": "^22.7.6",
"@types/react": "^18.3.10",
"@types/react-dom": "^18.3.0",
"@vitejs/plugin-react": "^4.3.2",
"autoprefixer": "^10.4.20",
"eslint": "^9.11.1",
"copy-webpack-plugin": "^11.0.0",
"eslint": "^8.56.0",
"eslint-plugin-react-hooks": "^5.1.0-rc.0",
"eslint-plugin-react-refresh": "^0.4.12",
"globals": "^15.9.0",
"postcss": "^8.4.47",
"tailwindcss": "^3.4.14",
"ts-loader": "^9.5.1",
"typescript": "^5.5.3",
"typescript-eslint": "^8.7.0",
"webpack": "^5.74.0",
"webpack-cli": "^4.10.0",
"webpack-dev-server": "^4.11.1",
"@vitejs/plugin-react": "^4.3.2",
"vite": "^5.4.8"
}
}
34 changes: 34 additions & 0 deletions examples/buddybook/webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
const CopyWebpackPlugin = require("copy-webpack-plugin");
const path = require("path");

module.exports = {
entry: "./src/main.tsx",
output: {
path: path.resolve(__dirname, "build"),
filename: "index.js",
},
resolve: {
extensions: ['.ts', '.tsx', '.js', '.jsx'],
},
module: {
rules: [
{
test: /\.tsx?$/,
use: 'ts-loader',
exclude: /node_modules/,
},
],
},
experiments: {
asyncWebAssembly: true,
},
mode: "development",
plugins: [
new CopyWebpackPlugin({
patterns: [
{ from: "index.html" },
{ from: "public", to: "public" }
],
}),
],
};

0 comments on commit c853438

Please sign in to comment.