Skip to content

Commit

Permalink
switch cicd flow to conda
Browse files Browse the repository at this point in the history
  • Loading branch information
MisterXY89 committed Dec 8, 2023
1 parent 6980978 commit 36cc127
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# 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

on:
Expand All @@ -19,21 +16,26 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
- name: Set up Miniconda
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
miniconda-version: "latest"
python-version: "3.10"
activate-environment: adl
environment-file: environment.yml
condarc-file: condarc.yml

# Assuming you have an environment.yml that specifies dependencies.
# If not, you can use conda or mamba commands to install packages directly
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
conda env update --file environment.yml --name adl
- 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
conda run --name adl flake8 --config .flake8
- name: Test with pytest
run: |
python -m pytest
conda run --name adl python -m pytest
File renamed without changes.

0 comments on commit 36cc127

Please sign in to comment.