-
Notifications
You must be signed in to change notification settings - Fork 4
42 lines (33 loc) · 1.09 KB
/
run_tests_with_gpu.yml
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
name: Run Tests with GPU
on:
workflow_dispatch: # Allows for manual triggering
concurrency:
group: run-tests-gpu # Fixed group name to ensure only one instance runs
cancel-in-progress: false
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Set SSH permissions
run: |
mkdir -p ~/.ssh
chmod 700 ~/.ssh
sudo chown $USER:$USER ~/.ssh
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install and configure dstack
run: |
pip install dstack
dstack config --url https://sky.dstack.ai --project ${{ secrets.DSTACK_PROJECT }} --token ${{ secrets.DSTACK_TOKEN }}
dstack init
- name: Run tests with GPU
run: |
HF_TOKEN=${{ secrets.HF_TOKEN }} dstack apply -f tests.dstack.yml --force -y
- name: Extract pytest logs
if: ${{ always() }}
run: |
dstack logs aana-tests | sed -n '/============================= test session starts ==============================/,$p'