add Vite-based app for example TypeScript application

This commit is contained in:
Brandon Liu
2022-05-02 16:37:41 +08:00
parent a006dc2600
commit a1753af6df
24 changed files with 3689 additions and 0 deletions

40
.github/workflows/actions.yml vendored Normal file
View File

@@ -0,0 +1,40 @@
name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build_app:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/setup-node@v3
with:
node-version: 16.x
- run: cd js && npm install && npm run build
- run: cd app && npm install && npm run build
- name: build_app
uses: peaceiris/actions-gh-pages@v3
# if: ${{ github.ref == 'refs/heads/master' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./app/dist
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/setup-node@v3
with:
node-version: 16.x
- run: cd js && npm install && npm test
- run : cd python && python -m unittest test/test_*