Spaces:
Paused
Paused
Download .github/workflows/github-ci.yml from mattoofahad/simple-chat-bot: direct link, hf CLI and curl.
- Browser
- Download file 1.39 kB
-
https://huggingface.co/spaces/mattoofahad/simple-chat-bot/resolve/main/.github/workflows/github-ci.yml
- Command line
-
hf download hf://spaces/mattoofahad/simple-chat-bot/.github/workflows/github-ci.yml
-
curl -L -o github-ci.yml https://huggingface.co/spaces/mattoofahad/simple-chat-bot/resolve/main/.github/workflows/github-ci.yml
1.39 kB
| 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 }} |