Skip to content

Commit

Permalink
chore: Update CI workflow to include running tests with pytest
Browse files Browse the repository at this point in the history
  • Loading branch information
LeiWang1999 committed Jul 5, 2024
1 parent 4dc2c10 commit 3a45fc3
Showing 1 changed file with 28 additions and 4 deletions.
32 changes: 28 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: CI
on: [push, pull_request]

jobs:
build:
format-check:
runs-on: self-hosted

steps:
Expand All @@ -26,18 +26,42 @@ jobs:
python -m pip install --upgrade pip
if [ -f requirements-dev.txt ]; then python -m pip install -r requirements-dev.txt; fi
- name: Run format
- name: Run format check
run: |
source bitblas_ci/bin/activate
./format.sh
build-test:
runs-on: self-hosted
needs: format-check

steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.9'

- name: Create virtual environment
run: python -m venv bitblas_ci

- name: Activate virtual environment and install dependencies
run: |
source bitblas_ci/bin/activate
python -m pip install --upgrade pip
if [ -f requirements-dev.txt ]; then python -m pip install -r requirements-dev.txt; fi
- name: Install project in wheel mode
run: |
source bitblas_ci/bin/activate
python -m pip install .
- name: Run tests
run: |
source bitblas_ci/bin/activate
cd testing/python
python -m pytest
python -m pytest

0 comments on commit 3a45fc3

Please sign in to comment.