From e15a48dc0f389658db4c3a5787bbb7d0d1bb33e9 Mon Sep 17 00:00:00 2001 From: Ben Thompson Date: Mon, 11 Jan 2021 20:43:17 -0500 Subject: [PATCH] Set up CI pipeline with github actions. --- .github/workflows/workflow.yml | 33 +++++++++++++++++++++++++++++++++ environment.yml | 9 +++++++++ 2 files changed, 42 insertions(+) create mode 100644 .github/workflows/workflow.yml create mode 100644 environment.yml 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