From 652421768c0a1788c6c4eb792cb2073b7854d5c2 Mon Sep 17 00:00:00 2001 From: Zebedee Nicholls Date: Mon, 3 May 2021 19:29:35 +1000 Subject: [PATCH] Add CI with pyam install --- .github/workflows/ci-cd-workflow.yml | 31 ++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/.github/workflows/ci-cd-workflow.yml b/.github/workflows/ci-cd-workflow.yml index b9172732..b3f412a3 100644 --- a/.github/workflows/ci-cd-workflow.yml +++ b/.github/workflows/ci-cd-workflow.yml @@ -149,6 +149,37 @@ jobs: exit 1 fi + build-pyam: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [3.7] + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + - name: Setup python + uses: actions/setup-python@v1 + with: + python-version: ${{ matrix.python-version }} + - name: Install test dependencies + run: | + pip install --upgrade pip wheel + pip install -e .[tests] + pip install pyam-iamc + + - name: Test with pytest + env: + MIN_COVERAGE: 90 + run: | + pytest tests -r a --cov=scmdata --cov-report=xml + if ! coverage report --fail-under=${MIN_COVERAGE} --show-missing + then + echo + echo "Error: Test coverage has to be at least ${MIN_COVERAGE}" + exit 1 + fi + test-notebooks: runs-on: ubuntu-latest strategy: