-
Notifications
You must be signed in to change notification settings - Fork 1
57 lines (46 loc) · 1.36 KB
/
pytest.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
53
54
55
56
57
name: Codebase tests (GPU)
on:
pull_request:
push:
branches:
- main
workflow_dispatch:
env:
XLA_PYTHON_CLIENT_PREALLOCATE: "false"
XLA_PYTHON_CLIENT_ALLOCATOR: "platform"
jobs:
test:
runs-on: [self-hosted, b3d]
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- name: install curl
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: curl
version: 1.0
- name: Authenticate gcloud
id: auth
uses: google-github-actions/auth@v2
with:
credentials_json: "${{ secrets.ARTIFACT_REGISTRY_KEY }}"
- name: Setup gcloud
uses: google-github-actions/setup-gcloud@v2
- name: Run tests
run: |
# install pixi
curl -fsSL https://pixi.sh/install.sh | bash
source ~/.bashrc
export PATH=$HOME/.pixi/bin:$HOME/.local/bin:$PATH
# install pipx and inject gcp backend
pixi global install pipx
pipx install keyring
pipx inject keyring \
keyrings.google-artifactregistry-auth \
--index-url \
https://pypi.org/simple
# install gpu environment
pixi clean && pixi clean cache --yes
pixi install --locked -e gpu -v --pypi-keyring-provider subprocess
# run tests
pixi run -e gpu test-ci