Repository navigation
72 lines (60 loc) · 1.97 KB
/
Copy pathtests_python_versions.yml
File metadata and controls
72 lines (60 loc) · 1.97 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: Tests with all supported Python versions
on:
schedule:
- cron: '0 1 * * *' # Runs daily at 1am UTC
workflow_dispatch:
env:
TQDM_DISABLE: 1
CI_SLACK_CHANNEL: ${{ secrets.CI_PUSH_MAIN_CHANNEL }}
HF_TOKEN: ${{ secrets.HF_TOKEN }}
PYTORCH_CUDA_ALLOC_CONF: "expandable_segments:True"
PYTORCH_ALLOC_CONF: "expandable_segments:True"
permissions: {}
jobs:
tests:
permissions:
contents: read
name: Tests with Python ${{ matrix.python-version }}
strategy:
matrix:
python-version: ['3.11', '3.12', '3.14'] # 3.13 is already covered by the Tests workflow
fail-fast: false
runs-on:
group: aws-g6e-4xlarge
container:
image: pytorch/pytorch:2.8.0-cuda12.8-cudnn9-devel
options: --gpus all
defaults:
run:
shell: bash
steps:
- name: Git checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: ${{ matrix.python-version }}
- name: Install Make and Git
run: |
apt-get update && apt-get install -y make git curl
- name: Install uv
uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v10.1.0
- name: Create Python virtual environment
run: |
uv venv
uv pip install --upgrade setuptools wheel
- name: Install dependencies
run: |
source .venv/bin/activate
uv pip install ".[dev]"
- name: Test with pytest
run: |
source .venv/bin/activate
make test
- name: Post to Slack
if: always()
uses: ./.github/actions/post-slack
with:
slack_channel: ${{ env.CI_SLACK_CHANNEL }}
title: Tests with Python ${{ matrix.python-version }}
slack_token: ${{ secrets.SLACK_CIFEEDBACK_BOT_TOKEN }}