-
Notifications
You must be signed in to change notification settings - Fork 5
50 lines (46 loc) · 1.44 KB
/
test-torch.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
name: Test workflows based on torch
on: null
# https://docs.github.com/en/actions/using-jobs/running-jobs-in-a-container
jobs:
torch_tests:
name: Run pytest for torch
runs-on: ubuntu-latest
container:
image: pytorch/pytorch:latest
volumes:
- ${{ github.workspace }}/src:/repo/src
- ${{ github.workspace }}/use-cases:/repo/use-cases
- ${{ github.workspace }}/tests:/repo/tests
- ${{ github.workspace }}/env-files:/repo/env-files
- ${{ github.workspace }}/pyproject.toml:/repo/pyproject.toml
- ${{ github.workspace }}/Makefile:/repo/Makefile
steps:
- name: Install environment
run: |
ls -la $(pwd) &&
ls -la /repo &&
cd /repo &&
pip install --no-cache /repo[dev]
- name: Run tests
run: |
which pip &&
which pip3 &&
which python &&
which python3
- name: Run tests
run: pytest -v tests/
# run: |
# whoami &&
# pwd &&
# ls -la $(pwd) &&
# ls -la /repo
# # # Now the repository code is available inside the Docker container
# # # You can use it as needed
# # cd ${{ github.workspace }} &&
# # # Run your commands here
# # ls -la . &&
# # ls -la ${{ github.workspace }} &&
# # ls -la ${{ github.workspace }}/.. &&
# # pwd &&
# # echo ${{ github.workspace }} &&
# # pip install .