■ ■ ■ ■ ■ ■
.github/workflows/requirement_check.yml
| 1 | + | name: Check requirements compatibility |
| 2 | + | |
| 3 | + | on: |
| 4 | + | push: |
| 5 | + | branches: [main] |
| 6 | + | |
| 7 | + | jobs: |
| 8 | + | check-requirements: |
| 9 | + | runs-on: ubuntu-latest |
| 10 | + | steps: |
| 11 | + | - uses: actions/checkout@v2 |
| 12 | + | - name: Install pip and pip-tools |
| 13 | + | run: | |
| 14 | + | python -m ensurepip --default-pip |
| 15 | + | pip install pip-tools |
| 16 | + | - name: Compile requirements |
| 17 | + | run: pip-compile --output-file=requirements.lock requirements.txt |
| 18 | + | - name: Install generated requirements |
| 19 | + | run: pip install -r requirements.lock |
| 20 | + | - name: Run tests |
| 21 | + | run: pytest |
| 22 | + | |