diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml new file mode 100644 index 0000000..edddc40 --- /dev/null +++ b/.github/workflows/workflow.yml @@ -0,0 +1,33 @@ +name: Lint and Test + +on: [push] + +jobs: + build-linux: + runs-on: ubuntu-latest + strategy: + max-parallel: 5 + + steps: + - uses: actions/checkout@v2 + - name: Set up Python 3.8 + uses: actions/setup-python@v2 + with: + python-version: 3.8 + - name: Add conda to system path + run: | + # $CONDA is an environment variable pointing to the root of the miniconda directory + echo $CONDA/bin >> $GITHUB_PATH + - name: Install dependencies + run: | + conda env update --file environment.yml --name base + - name: Lint with flake8 + run: | + flake8 . + - name: Check formatting with black + run: | + black . + - name: Test with pytest + run: | + py.test + diff --git a/environment.yml b/environment.yml new file mode 100644 index 0000000..f21e59c --- /dev/null +++ b/environment.yml @@ -0,0 +1,9 @@ +name: cppimport +channels: + - conda-forge +dependencies: + - pybind11 + - mako + - black + - pytest + - flake8