Skip to content

Mamba Env Pytest

Mamba Env Pytest #5

name: Mamba Env Pytest
run-name: Mamba Env Pytest
on:
pull_request:
types: [labeled, opened]
merge_group:
workflow_dispatch:
jobs:
build-linux:
runs-on: ubuntu-latest
strategy:
max-parallel: 5
steps:
- uses: actions/checkout@v4
- uses: mamba-org/setup-micromamba@v1
with:
micromamba-version: '1.5.8-0' # any version from https://github.com/mamba-org/micromamba-releases
micromamba-binary-path: /usr/local/bin/micromamba
environment-name: micromamba_pytest_env
create-args: python=3.11
post-cleanup: 'all'
# - name: Lint with flake8
# run: |
# mamba install flake8
# # 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: Install CUDA
run: $MAMBA_EXE install cuda -c nvidia -y
shell: micromamba run -n micromamba_pytest_env {0}
- name: Install Ninja
run: $MAMBA_EXE install ninja
shell: micromamba run -n micromamba_pytest_env {0}
- name: Install Python Requirements
run: pip install -r requirements.txt
shell: micromamba run -n micromamba_pytest_env {0}
- name: Install Flash Attention
run: pip install flash-attn==2.5.6 --no-build-isolation
shell: micromamba run -n micromamba_pytest_env {0}
- name: Install Pytest
run: pip install pytest
shell: micromamba run -n micromamba_pytest_env {0}
- name: Run Pytest Tests
run: pytest
shell: micromamba run -n micromamba_pytest_env {0}