Spaces:
Paused
Paused
| name: lint-and-test | |
| on: [push] | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.10"] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install pylint | |
| if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
| - name: Run pylint | |
| run: | | |
| pylint $(git ls-files '*.py') | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.10"] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install pytest-cov | |
| if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
| - name: Run pytest with coverage | |
| run: | | |
| pytest --cov=src --cov-report=term-missing --cov-branch | |
| env: | |
| DISCORD_HOOK: ${{ secrets.DISCORD_HOOK }} |