From c85c40751d5cb2ac44a3f0f8a61c650da42e9c33 Mon Sep 17 00:00:00 2001 From: "Arian R. Jamasb" Date: Thu, 1 Aug 2024 19:22:28 +0200 Subject: [PATCH] tests: add tests with github actions --- .github/workflows/tests.yaml | 44 ++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/tests.yaml diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml new file mode 100644 index 0000000..2c22e66 --- /dev/null +++ b/.github/workflows/tests.yaml @@ -0,0 +1,44 @@ +name: tests + +on: + push: + paths-ignore: + - "README.md" + - "docs/**" + - "CHANGELOG.md" + + pull_request: + paths-ignore: + - "README.md" + - "docs/*" + - "CHANGELOG.md" + +jobs: + build_cpu: + runs-on: ubuntu-latest + # https://github.com/marketplace/actions/setup-miniconda#use-a-default-shell + defaults: + run: + shell: bash -l {0} + + strategy: + matrix: + python-version: [3.7, 3.8, 3.9, "3.10", 3.11] + steps: + - name: Checkout repository + uses: actions/checkout@v3 + # See: https://github.com/marketplace/actions/setup-miniconda + - name: Setup miniconda + uses: conda-incubator/setup-miniconda@v2 + with: + auto-update-conda: true + miniforge-variant: Mambaforge + conda-channels: conda-forge + python-version: ${{ matrix.python-version }} + use-mamba: true + - name: Install BioPandas + run: pip install -e . + - name: Install Dev Dependencies + run: pip install mmtf-python numpy scipy pandas pytest looseversion importlib_resources + - name: Run unit tests and generate coverage report + run: pytest -s -