diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml new file mode 100644 index 0000000..f537855 --- /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 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: 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