还没有成功运行的代码,到时候继续修改 #50
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: Lint | |
on: [push, pull_request] | |
jobs: | |
backend-lint: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./backend | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: '3.10' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Analysing the code with pylint | |
run: | | |
pylint $(git ls-files '*.py') | |
frontend-lint: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./frontend | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
name: Setup Node.js 18.20 | |
with: | |
node-version: '18.20' | |
check-latest: true | |
- name: Install dependencies | |
run: | | |
npm install | |
- name: Analysing the code with eslint | |
run: | | |
npm run lint |