Skip to content

Commit

Permalink
testing
Browse files Browse the repository at this point in the history
  • Loading branch information
ctrlaltaf committed Jun 5, 2024
1 parent e805b92 commit c796992
Showing 1 changed file with 16 additions and 24 deletions.
40 changes: 16 additions & 24 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
@@ -1,43 +1,35 @@
# 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:
auto-update-conda: true
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

0 comments on commit c796992

Please sign in to comment.