-
Notifications
You must be signed in to change notification settings - Fork 4
49 lines (44 loc) · 1.45 KB
/
basic.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
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: dev
on: [push, pull_request]
jobs:
example-4:
name: test
runs-on: "ubuntu-latest"
defaults:
run:
shell: bash -el {0}
steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
# cache
- uses: actions/cache@v2
env:
# Increase this value to reset cache if etc/example-environment.yml has not changed
CACHE_NUMBER: 0
with:
path: ~/conda_pkgs_dir
key:
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{
hashFiles('etc/example-environment.yml') }}
activate-environment: foo
python-version: 3.8
channels: conda-forge
allow-softlinks: true
channel-priority: strict
show-channel-urls: true
use-only-tar-bz2: true
- run: |
conda config --add channels conda-forge
conda config --set channel_priority strict
conda info
conda install python==3.8 pytorch pytest pytest-xdist numpy hypothesis -y
conda list
conda config --show-sources
- run: |
echo $PWD
ls -l
- name: Run tests
run: |
pytest torch_np/ -s -n 2 --runslow