-
Notifications
You must be signed in to change notification settings - Fork 16
57 lines (52 loc) · 1.53 KB
/
code-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
name: build
on:
push:
paths-ignore:
- "README.md"
- "docs/**"
- "CHANGELOG.md"
pull_request:
paths-ignore:
- "README.md"
- "docs/**"
- "CHANGELOG.md"
jobs:
buld_cpu:
name: Build CPU
strategy:
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.9, "3.10"]
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup miniconda
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
miniforge-variant: Mambaforge
channels: "conda-forge, pytorch, pyg"
python-version: ${{ matrix.python-version }}
use-mamba: true
- id: cache-dependencies
name: Cache dependencies
uses: actions/[email protected]
with:
path: ${{ github.workspace }}/.venv
key: ${{ matrix.os }}-${{ hashFiles('**/poetry.lock') }}
restore-keys: ${{ matrix.os }}-
- name: Install Workshop
if: steps.cache-dependencies.cache-hit != 'true'
run: |
python -m pip install -U pip poetry
python -m pip install -U pip poethepoet
poetry --version
poetry check --no-interaction
poetry config virtualenvs.in-project true
poetry install --no-interaction --without docs
poetry run install_pyg_workshop
poe install-torchdrug
- name: Run tests
run: |
poetry run pytest -v