| name: tests on transformers main | |
| on: | |
| push: | |
| branches: [main] | |
| paths-ignore: | |
| - 'docs/**' | |
| env: | |
| TRANSFORMERS_IS_CI: 1 | |
| permissions: {} | |
| jobs: | |
| tests: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| persist-credentials: false | |
| - name: Set up Python 3.11 | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: 3.11 | |
| cache: "pip" | |
| cache-dependency-path: "setup.py" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| # cpu version of pytorch | |
| pip install -U git+https://github.com/huggingface/transformers.git | |
| pip install -e .[test] | |
| - name: Test with pytest | |
| run: | | |
| make test | |
| - name: Post to Slack | |
| if: always() | |
| uses: huggingface/hf-workflows/.github/actions/post-slack@3f88d63d3761558a32e8e46fc2a8536e04bb2aea # main from Feb 2025-02-24 | |
| with: | |
| slack_channel: ${{ secrets.SLACK_CHANNEL_ID }} | |
| title: 🤗 Results of transformers main tests | |
| status: ${{ job.status }} | |
| slack_token: ${{ secrets.SLACK_CIFEEDBACK_BOT_TOKEN }} | |