Update 更新链接 #225
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
# This workflow will install Python dependencies, run tests and lint with a single version of Python | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: check code style, run pytest and nuxt build | |
on: | |
push: | |
branches: | |
- master | |
- add-workflow-actions | |
pull_request: | |
branches: | |
- master | |
jobs: | |
test-server: | |
runs-on: ubuntu-latest | |
container: | |
image: talebook/calibre-docker | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Inspect | |
run: | | |
which calibre | |
python3 -V | |
- name: Install dependencies | |
run: | | |
python3 -m pip install --upgrade pip | |
pip3 install flake8 pytest | |
if [ -f requirements.txt ]; then pip3 install -r requirements.txt; fi | |
- name: Lint with flake8 | |
run: | | |
# stop the build if there are Python syntax errors or undefined names | |
flake8 webserver --count --select=E9,F63,F7,F82 --show-source --statistics | |
# exit-zero treats all errors as warnings | |
flake8 webserver --count --exit-zero --statistics --config .style.yapf | |
- name: Test with pytest | |
run: | | |
pytest ./tests | |
test-ui: | |
runs-on: ubuntu-latest | |
container: | |
image: node:16-alpine | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install dependencies | |
run: | | |
cd app | |
npm install | |
- name: nuxt build | |
run: | | |
cd app | |
npm run build |