Skip to content

add gh action to run unittests #24

add gh action to run unittests

add gh action to run unittests #24

Workflow file for this run

name: Run Tests
on:
pull_request:
branches:
- main # Runs on pull requests targeting the main branch
jobs:
tests:
name: Test (${{ matrix.python-version }}, ${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- uses: conda-incubator/setup-miniconda@v2
with:
# activate-environment: cq
auto-update-conda: true
python-version: ${{ matrix.python-version }}
channels: conda-forge
- name: Create conda environment
run: conda create --name cq
- name: Activate conda environment
run: conda activate cq
- name: Install cadquery
run: mamba install cadquery
- name: Install pip dependencies
run: pip install cqkit pytest
- name: Install package
run: pip install .
- name: Run tests
run: pytest tests