Migrate: build-tool use vite replace vue-cli #342
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: release | |
on: | |
push: | |
branches: next | |
pull_request: | |
branches: next | |
jobs: | |
install: | |
name: Install dependencies and cache modeles | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Cache node modules | |
id: cache-node-modules | |
uses: actions/cache@v2 | |
with: | |
path: | | |
node_modules | |
*/*/node_modules | |
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} | |
- name: Cache Cypress binary | |
id: cache-cypress-binary | |
uses: actions/cache@v2 | |
with: | |
path: ~/.cache/Cypress | |
key: cypress-${{ runner.os }}-cache-${{ hashFiles('**/yarn.lock') }} | |
- name: Install | |
env: | |
# make sure every Cypress install prints minimal information | |
CI: 1 | |
if: | | |
steps.cache-node-modules.outputs.cache-hit != 'true' || | |
steps.cache-cypress-binary.outputs.cache-hit != 'true' | |
run: | | |
npx [email protected] bootstrap | |
npx cypress install | |
# cypress-run: | |
# name: Cypress run | |
# runs-on: ubuntu-latest | |
# needs: install | |
# steps: | |
# - uses: actions/checkout@v2 | |
# - name: Load node_modules | |
# uses: actions/cache@v2 | |
# with: | |
# path: | | |
# node_modules | |
# */*/node_modules | |
# key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} | |
# - name: Cache Cypress binary | |
# id: cache-cypress-binary | |
# uses: actions/cache@v2 | |
# with: | |
# path: ~/.cache/Cypress | |
# key: cypress-${{ runner.os }}-cache-${{ hashFiles('**/yarn.lock') }} | |
# - name: Install dependencies | |
# if: steps.cache-cypress-binary.outputs.cache-hit != 'true' | |
# run: | | |
# yarn install --frozen-lockfile | |
# npx cypress install | |
# - name: Verify Cypress | |
# run: | | |
# npx cypress cache path | |
# npx cypress cache list | |
# npx cypress verify | |
# - name: Start server in the background | |
# run: yarn dev:web & | |
# - name: Cypress tests | |
# uses: cypress-io/github-action@v2 | |
# env: | |
# CYPRESS_ACTION: true | |
# with: | |
# install: false | |
# start: yarn dev:api | |
# command: yarn test:run | |
# - name: Compress and upload the test result folder | |
# if: always() | |
# env: | |
# ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} | |
# run: | | |
# tar -zcvf ./tests/e2e/video.tar.gz ./tests/e2e/video | |
# ./script/deploy.sh $ACCESS_TOKEN github.com/hq001/test_video.git tests/e2e | |
lint: | |
name: Yarn build | |
runs-on: ubuntu-latest | |
needs: install | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: 12 | |
- name: Load node_modules | |
id: cache-node-modules | |
uses: actions/cache@v2 | |
with: | |
path: | | |
node_modules | |
*/*/node_modules | |
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} | |
- name: Install | |
if: steps.cache-node-modules.outputs.cache-hit != 'true' | |
run: yarn install --frozen-lockfile | |
- name: Lint | |
run: yarn lint | |
build-electron: | |
name: Automatically release electron version | |
runs-on: ubuntu-latest | |
needs: install | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: 12 | |
- name: Load node_modules | |
id: cache-node-modules | |
uses: actions/cache@v2 | |
with: | |
path: | | |
node_modules | |
*/*/node_modules | |
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} | |
- name: Install | |
if: steps.cache-node-modules.outputs.cache-hit != 'true' | |
run: yarn install --frozen-lockfile | |
- name: Build electron | |
run: yarn build:electron:linux | |
- name: Releases to github | |
run: | | |
echo 'Waiting for scripting' |