完善 README.md:新增專案描述及補充缺失的章節說明 #6
This file contains hidden or 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: CI Pipeline | |
| on: | |
| pull_request: | |
| type: [ opened, synchronize ] | |
| jobs: | |
| ci-pipeline: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v2 | |
| - name: Get changed files | |
| uses: dorny/paths-filter@v2 | |
| id: filter | |
| with: | |
| list-files: shell | |
| filters: | | |
| py_modified: | |
| - added|modified: "./**/*.py" | |
| - name: Setup Python | |
| if: ${{ steps.filter.outputs.py_modified == 'true' }} | |
| uses: actions/setup-python@v2 | |
| with: | |
| python-version: 3.10.0 | |
| architecture: x64 | |
| cache: 'pip' | |
| - name: Install dependencies | |
| if: ${{ steps.filter.outputs.py_modified == 'true' }} | |
| run: pip install -r requirements.txt | |
| - name: Run flake8 | |
| if: ${{ steps.filter.outputs.py_modified == 'true' }} | |
| run: flake8 ${{ steps.filter.outputs.py_modified_files }} | |
| - name: Run pytest | |
| if: ${{ steps.filter.outputs.py_modified == 'true' }} | |
| run: pytest tests |