-
Notifications
You must be signed in to change notification settings - Fork 10
82 lines (79 loc) · 2.81 KB
/
tests.yaml
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
73
74
75
76
77
78
79
80
81
name: tests
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
cpu:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set environment variables
run: |
echo "CURRENT_WEEK=$(date +'%Y-%U')" >> $GITHUB_ENV
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- uses: actions/cache@v4
with:
path: ${{ env.pythonLocation }}
key: ${{ env.CURRENT_WEEK }}-${{ env.pythonLocation }}-${{ hashFiles('fme/requirements.txt') }}-${{ hashFiles('fme/dev-requirements.txt') }}-${{ hashFiles('constraints.txt') }}
- name: Install dependencies
run: |
python -m pip install uv
uv pip install --system -c constraints.txt -e ./fme[dev]
- name: Run pytest
run: |
make test
cpu-very-fast:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set environment variables
run: |
echo "CURRENT_WEEK=$(date +'%Y-%U')" >> $GITHUB_ENV
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- uses: actions/cache@v4
with:
path: ${{ env.pythonLocation }}
key: ${{ env.CURRENT_WEEK }}-${{ env.pythonLocation }}-${{ hashFiles('fme/requirements.txt') }}-${{ hashFiles('fme/dev-requirements.txt') }}-${{ hashFiles('constraints.txt') }}
- name: Install dependencies
run: |
python -m pip install uv
uv pip install --system -c constraints.txt -e ./fme[dev]
- name: Run pytest
run: |
make test_very_fast
gpu:
# These steps run on our self-hosted k8s GPU runners. See below for setup notes
# https://github.com/ai2cm/long-lived-infrastructure#installing-the-github-actions-runner-controller
runs-on: arc-runner-set
steps:
- uses: actions/checkout@v3
- name: Set environment variables
run: |
echo "CURRENT_WEEK=$(date +'%Y-%U')" >> $GITHUB_ENV
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- uses: actions/cache@v4
with:
path: ${{ env.pythonLocation }}
key: ${{ env.CURRENT_WEEK }}-${{ env.pythonLocation }}-${{ hashFiles('fme/requirements.txt') }}-${{ hashFiles('fme/dev-requirements.txt') }}-${{ hashFiles('constraints.txt') }}
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y make git
python -m pip install uv
uv pip install --system -c constraints.txt -e ./fme[dev]
- name: Run CUDA check and pytest
run: |
export PATH=/usr/local/nvidia/bin:${PATH}
export LD_LIBRARY_PATH=/usr/local/nvidia/lib64:${LD_LIBRARY_PATH}
python3 fme/fme/require_gpu.py
make test