xonsh/.github/workflows/pytest-macos-3.7.yml
Noorhteen Raja NJ ee46b17255
chore: add pip cache for github actions (#3973)
this will further speedup the workflow.
- also the macos and windows should now have proper cache with conda
- use jinja to template workflows that looks the same
2020-11-17 14:48:22 -05:00

57 lines
1.7 KiB
YAML

name: pytest macos 3.7
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macOS-latest]
python-version: [3.7]
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
- name: Get pip cache dir
id: pip-cache
shell: bash -l {0}
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 Xonsh and run tests
shell: bash -l {0}
run: |
python -m pip --version
python -m pip install -r requirements/tests.txt
python -m pip install . --no-deps
python -m xonsh run-tests.xsh test -- --timeout=240