-
Notifications
You must be signed in to change notification settings - Fork 1.3k
52 lines (43 loc) · 1.12 KB
/
ci.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
43
44
45
46
47
48
49
50
51
52
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test-linux-gpu:
runs-on: self-hosted
strategy:
fail-fast: false
# matrix:
# python-version: ["3.9"]
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install Dependencies
run: |
pip install black
- name: Black Format Check
run: black --check .
- name: Run Tests
run: |
docker run -u ci:ci --gpus all --rm -v ${{ github.workspace }}:/app cuda11_py11:latest \
bash -c "cd /app && \
sudo bash ./.github/workflows/setup_env.sh && \
pip install -e . && \
python -m unittest discover tests"
- name: Display Speed Test
run: cat speed_test.txt
- name: Upload Test Results as Artifact
uses: actions/upload-artifact@v3
with:
name: speed-test-results
path: speed_test.txt