mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-11-30 19:03:01 +01:00
44 lines
1,005 B
YAML
44 lines
1,005 B
YAML
name: build
|
|
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- 'master'
|
|
push:
|
|
branches:
|
|
- 'master'
|
|
|
|
jobs:
|
|
test:
|
|
name: Run Tests
|
|
runs-on: "macos-latest"
|
|
defaults:
|
|
run:
|
|
shell: bash -l {0}
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Cache conda
|
|
uses: actions/cache@v2
|
|
env:
|
|
# Increase this value to reset cache if environment.yml has not changed
|
|
CACHE_NUMBER: 0
|
|
with:
|
|
path: ~/conda_pkgs_dir
|
|
key:
|
|
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{
|
|
hashFiles('environment.yml') }}
|
|
- uses: conda-incubator/setup-miniconda@v2
|
|
with:
|
|
activate-environment: test
|
|
environment-file: environment.yml
|
|
python-version: 3.8
|
|
auto-activate-base: false
|
|
use-only-tar-bz2: true
|
|
- name: Conda Info
|
|
run: |
|
|
conda info
|
|
conda list
|
|
- name: Run Pytest
|
|
run: |
|
|
python -m pytest
|