From eb27817b106198a03e51aeba9488afc275d02440 Mon Sep 17 00:00:00 2001 From: jdebacker Date: Mon, 5 Apr 2021 14:21:03 -0400 Subject: [PATCH 1/3] add GH action for testing --- .github/workflows/build_and_test.yml | 44 ++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/build_and_test.yml diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml new file mode 100644 index 0000000..1e7e657 --- /dev/null +++ b/.github/workflows/build_and_test.yml @@ -0,0 +1,44 @@ +name: Build Package and Test Source Code [Python 3.7, 3.8, 3.9] + +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [3.7, 3.8, 3.9] + + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + persist-credentials: false + + - name: Setup Miniconda using Python ${{ matrix.python-version }} + uses: conda-incubator/setup-miniconda@v2 + with: + activate-environment: behresp-dev + environment-file: environment.yml + python-version: ${{ matrix.python-version }} + auto-activate-base: false + + - name: Build + shell: bash -l {0} + run: | + pip install -e . + pip install pytest-cov + pip install pytest-pycodestyle + - name: Test + shell: bash -l {0} + working-directory: ./ + run: | + pytest -m 'not requires_pufcsv and not pre_release and not local' --pycodestyle --cov=./ --cov-report=xml + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v1 + with: + file: ./coverage.xml + flags: unittests + name: codecov-umbrella + fail_ci_if_error: true + verbose: true \ No newline at end of file From 5fa94c9930a7c4f5712a31c00c28229a80ffaeaa Mon Sep 17 00:00:00 2001 From: jdebacker Date: Mon, 5 Apr 2021 18:56:45 -0400 Subject: [PATCH 2/3] update env to specify taxcalc 3.1 or greater and remove PSL channel --- environment.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/environment.yml b/environment.yml index c1470d9..26c2686 100644 --- a/environment.yml +++ b/environment.yml @@ -1,8 +1,7 @@ name: behresp-dev channels: -- PSLmodels - conda-forge dependencies: - python -- "taxcalc>=3.0.0" +- "taxcalc>=3.1.0" - pytest From e07973a702a3706db12a54ad291a64e94c623b78 Mon Sep 17 00:00:00 2001 From: jdebacker Date: Mon, 5 Apr 2021 19:04:06 -0400 Subject: [PATCH 3/3] update meta.yaml to be consistent with environment.yml --- conda.recipe/meta.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conda.recipe/meta.yaml b/conda.recipe/meta.yaml index 5ab9da4..30b8b1b 100755 --- a/conda.recipe/meta.yaml +++ b/conda.recipe/meta.yaml @@ -5,12 +5,12 @@ package: requirements: build: - python - - "taxcalc>=3.0.0" + - "taxcalc>=3.1.0" - pytest run: - python - - "taxcalc>=3.0.0" + - "taxcalc>=3.1.0" - pytest test: