forked from xonsh/xonsh
-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (56 loc) · 1.75 KB
/
pytest-linux-3.6.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
58
59
60
name: pytest linux 3.6
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: [ "3.6" ]
defaults:
run:
shell: bash -l {0}
name: Python ${{ matrix.python-version }} ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: |
~/conda_pkgs_dir
~/miniconda*/envs/
key: ${{ runner.os }}-${{ matrix.python-version }}-env-${{ hashFiles('requirements/tests.txt') }}
restore-keys: |
${{ runner.os }}-${{ matrix.python-version }}-env-
- name: Setup conda
uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: xonsh-test
auto-update-conda: true
python-version: ${{ matrix.python-version }} # this itself makes sure that Python version is installed
condarc-file: ci/condarc.yml
use-only-tar-bz2: true
- name: Get pip cache dir
id: pip-cache
run: |
python -m pip install --upgrade pip
echo "::set-output name=dir::$(python -m pip cache dir)"
- name: pip cache
uses: actions/cache@v2
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('requirements/tests.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip --version
python -m pip install -r requirements/tests.txt
python -m pip install . --no-deps
- name: Run tests
run: python -m xonsh run-tests.xsh test -- --timeout=240