updated action versions #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Python Extension CI | |
on: | |
push: | |
branches: | |
- main | |
permissions: | |
contents: read | |
jobs: | |
build-and-test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.8' | |
- name: Install build dependencies | |
run: | | |
if [ "${{ matrix.os }}" == "windows-latest" ]; then | |
choco install visualstudio2019buildtools --package-parameters "--add Microsoft.VisualStudio.Component.VC.Tools.x86.x64" | |
fi | |
- name: Build Python extension | |
run: | | |
python setup.py build_ext --inplace | |
- name: Install test dependencies | |
run: | | |
python -m pip install -r requirements.txt | |
- name: Run tests with pytest | |
run: | | |
pytest |