From c79699244d868cb056d717a5a57ff7fda6560308 Mon Sep 17 00:00:00 2001 From: ctrlaltaf Date: Wed, 5 Jun 2024 14:40:58 -0700 Subject: [PATCH] testing --- .github/workflows/python-app.yml | 40 +++++++++++++------------------- 1 file changed, 16 insertions(+), 24 deletions(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index ec925bd..d445b00 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -1,24 +1,23 @@ -# This workflow will install Python dependencies, run tests and lint with a single version of Python -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python - -name: Python application +name: Python application test with Conda on: push: - branches: [ "main" ] + branches: + - main + - master pull_request: - branches: [ "main" ] - -permissions: - contents: read + branches: + - main + - master jobs: - build: - + test: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - name: Check out the code + uses: actions/checkout@v3 + - name: Set up Miniconda uses: conda-incubator/setup-miniconda@v2 with: @@ -26,18 +25,11 @@ jobs: python-version: 3.12.3 # Change this to your desired Python version environment-file: environment.yml activate-environment: protein-prediction # Name of your conda environment as specified in environment.yml + - name: Install dependencies run: conda env update --file environment.yml --name protein-prediction - - name: Set up Python 3.12.3 - uses: actions/setup-python@v3 - with: - python-version: "3.12.3" - - name: Lint with flake8 - run: | - # stop the build if there are Python syntax errors or undefined names - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - - name: Test with pytest + + - name: Run tests run: | - pytest + source activate myenv + pytest \ No newline at end of file