Skip to content

Commit

Permalink
Create Github action for auto testing and packaging (#1)
Browse files Browse the repository at this point in the history
* create github action

* update action config

* update dep versions
  • Loading branch information
SYM01 authored May 11, 2024
1 parent f770275 commit 7c3c561
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 6 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages

name: Node.js Package

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 20
cache: 'npm'
cache-dependency-path: package-lock.json
- run: npm ci
- run: npm run build
- uses: actions/upload-artifact@v4
with:
name: Proxyverse
path: ./dist/
25 changes: 25 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages

name: Node.js Package

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 20
cache: 'npm'
cache-dependency-path: package-lock.json
- run: npm ci
- run: npm test
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"type": "module",
"scripts": {
"dev": "vite",
"test": "jest",
"build:test": "vue-tsc && vite build",
"build": "vue-tsc && vite build",
"dist": "rm -f dist.zip && cd ./dist/ && zip -r ../dist.zip ./",
Expand All @@ -21,7 +22,7 @@
"vue-router": "^4.3.2"
},
"devDependencies": {
"@arco-design/web-vue": "^2.55.1",
"@arco-design/web-vue": "^2.55.2",
"@arco-plugins/vite-vue": "^1.4.5",
"@jest/globals": "^29.7.0",
"@types/chrome": "^0.0.266",
Expand Down
2 changes: 1 addition & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default defineConfig({
plugins: [
vue(),
vitePluginForArco({
style: true,
style: 'css',
}),
{
name: 'manifest',
Expand Down

0 comments on commit 7c3c561

Please sign in to comment.