Skip to content

Create initial github actions #3

Create initial github actions

Create initial github actions #3

Workflow file for this run

name: Common Workflow
on:
pull_request:
branches:
- main
- dev
jobs:
pre-commit:
name: Pre-commit CI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup PDM
uses: pdm-project/setup-pdm@v4
with:
python-version: "3.11"
- name: Install dependencies
run: |
pdm install -G :all
- name: Run pre-commit
run: |
pdm pre-commit
test:
name: Test CI
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v4
- name: Setup PDM
uses: pdm-project/setup-pdm@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pdm install -G :all
- name: Run tests
run: |
pdm test
# Adding test for C Extension
test-c-extension:
name: Test C Extension
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v4
- name: Setup PDM
uses: pdm-project/setup-pdm@v4
with:
python-version: ${{ matrix.python-version }}
- name: Build with C Extension
run: |
C_GRAPHLIB_EXT=true pdm build
- name: Install generated wheel
run: |
pip install dist/*.whl
- name: Run tests
run: |
pdm test