Let users and reviewers rename crackmes; users change username & email (#176) #54
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: Tests | |
| on: | |
| push: | |
| pull_request: | |
| permissions: | |
| contents: read | |
| jobs: | |
| unit-and-route-tests: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| cache: pip | |
| - run: python -m pip install --requirement requirements.txt | |
| - name: Check Python syntax | |
| run: python -m compileall -q app review tests | |
| - name: Run fast tests | |
| run: pytest --cov=app --cov=review --cov-branch --cov-report=term-missing --cov-fail-under=75 | |
| mongodb-integration-tests: | |
| runs-on: ubuntu-latest | |
| services: | |
| mongodb: | |
| image: mongo:7 | |
| ports: | |
| - 27017:27017 | |
| options: >- | |
| --health-cmd "mongosh --quiet --eval 'db.runCommand({ ping: 1 })'" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 10 | |
| env: | |
| TEST_MONGODB_URL: mongodb://127.0.0.1:27017 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| cache: pip | |
| - run: python -m pip install --requirement requirements.txt | |
| - name: Run tests against MongoDB | |
| run: pytest |