Skip to content

Update appveyor.yml #366

Update appveyor.yml

Update appveyor.yml #366

Workflow file for this run

name: CI
on:
push:
branches:
- main # or your default branch name
pull_request:
branches:
- main # or your default branch name
jobs:
test:
runs-on: windows-latest
strategy:
matrix:
python-version: [3.11]
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Update PATH and Install Dependencies
run: |
echo "Adding Python to PATH"
echo "$env:PYTHONPATH;${{ env.pythonLocation }}\Scripts;${{ env.pythonLocation }}" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
pip install --upgrade pip
pip install pytest pytest-timeout pytest-cov
- name: Download and Setup liblsl
run: |
Invoke-WebRequest -Uri 'https://github.com/sccn/liblsl/releases/download/v1.16.2/liblsl-1.16.2-Win_amd64.zip' -OutFile 'liblsl.zip'
Expand-Archive -Path liblsl.zip -DestinationPath liblsl
Move-Item -Path .\liblsl\bin\lsl.dll -Destination ${{ env.pythonLocation }}\Lib\site-packages\
echo "PYLSL_LIB=${{ env.pythonLocation }}\Lib\site-packages\lsl.dll" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Additional Dependency Installation
run: |
pip uninstall -y urllib3
pip install --upgrade urllib3>=2.0.5
pip install ruff
pip install .
- name: Update Environment Variables
run: |
echo "Updating Environment Variables"
$env:PYTHONPATH="${{ github.workspace }}"
$env:PYLSL_LIB="${{ env.pythonLocation }}\Lib\site-packages\lsl.dll"
- name: Debug Information
run: |
python --version
pip list
echo "PYTHONPATH: $PYTHONPATH"
echo "PYLSL_LIB: $PYLSL_LIB"
#- name: Run Tests
# run: |
# pytest Tests/ --cov=pybci --cov-report=xml -vv
- name: Generate Report
run: |
coverage run --source=pybci/ -m pytest
coverage xml -i
#- name: Upload coverage to GitHub Artifacts
# uses: actions/upload-artifact@v2
# with:
# name: coverage-report
# path: coverage.xml
#- name: List working directory
# run: ls -al
- name: Upload Coverage to Codecov
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }} # Not required for public repos
# file: coverage.xml # Adjust this path if needed