Add tests workflow for v0.12-release branch #1
This file contains 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: | |
branches: [ v0.12-release ] | |
env: | |
TQDM_DISABLE: 1 | |
CI_SLACK_CHANNEL: ${{ secrets.CI_PUSH_MAIN_CHANNEL }} | |
jobs: | |
tests: | |
name: Tests with dev dependencies | |
runs-on: 'ubuntu-latest' | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.12 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
cache: "pip" | |
cache-dependency-path: | | |
setup.py | |
requirements.txt | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install -U git+https://github.com/huggingface/accelerate.git | |
python -m pip install -U git+https://github.com/huggingface/datasets.git | |
python -m pip install -U git+https://github.com/huggingface/transformers.git | |
python -m pip install ".[dev]" | |
- name: Test with pytest | |
run: | | |
make test | |
- name: Post to Slack | |
if: github.ref == 'refs/heads/main' && always() # Check if the branch is main | |
uses: huggingface/hf-workflows/.github/actions/post-slack@main | |
with: | |
slack_channel: ${{ env.CI_SLACK_CHANNEL }} | |
title: Results of latest TRL with Python 3.12 on ubuntu-latest with dev dependencies | |
status: ${{ job.status }} | |
slack_token: ${{ secrets.SLACK_CIFEEDBACK_BOT_TOKEN }} |