Add testing to CI flow (#418)

* new testing ci flow

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* install conda

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* test conda

* pre-commit fix

* remove if

* makefile fix

* fix pytest install

* argument for test

* restructure

* fix sync

* full path filter

* use setup-condav2

* syntax

* test path

* add binary argument

* remove which

* Update Makefile

* remove arguments

* trigger CI

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
Peter W
2022-05-20 13:45:49 -05:00
committed by GitHub
parent db49fd498a
commit ee46b46234
6 changed files with 56 additions and 15 deletions

View File

@@ -6,14 +6,15 @@ src_dir ?= $(base_dir)/src
examples ?= $(base_dir)/examples
app_dir ?= $(shell git rev-parse --show-prefix)
CONDA_EXE := conda
CONDA_ENV ?= ./env
env := $(CONDA_ENV)
conda_run := conda run -p $(env)
conda_run := $(CONDA_EXE) run -p $(env)
setup:
@if [ -z "$${CONDA_SHLVL:+x}" ]; then echo "Conda is not installed." && exit 1; fi
$(CONDA_EXE) env $(shell [ -d $(env) ] && echo update || echo create) -p $(env) --file environment.yml
$(conda_run) playwright install
$(CONDA_EXE) install -c anaconda pytest
clean:
find . -name \*.py[cod] -delete