Using SVN repository #34
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: CI | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
build-linux: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.11] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Docker | |
uses: docker/setup-buildx-action@v1 | |
- name: Build and Test in Debian Container | |
run: | | |
docker run --rm -v $(pwd):/app -w /app debian:latest /bin/bash -c " | |
export DEBIAN_FRONTEND=noninteractive && | |
apt-get update && | |
apt-get install -y --no-install-recommends wget build-essential \ | |
libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev \ | |
curl llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev \ | |
libffi-dev liblzma-dev python3.11 python3.11-venv python3.11-dev python3-pip && | |
python3.11 -m venv venv && | |
source venv/bin/activate && | |
pip install --upgrade pip && | |
pip install tox && | |
tox" | |
build-windows: | |
runs-on: windows-latest | |
strategy: | |
matrix: | |
python-version: [3.11, 3.12] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Add OpenDSS DLL to PATH | |
run: | | |
$currentPath = [System.Environment]::GetEnvironmentVariable('Path', [System.EnvironmentVariableTarget]::Process) | |
$newPath = "$currentPath;C:\path\to\py_dss_interface\src\py_dss_interface\opendss_official\windows\delphi\x64" | |
[System.Environment]::SetEnvironmentVariable('Path', $newPath, [System.EnvironmentVariableTarget]::Process) | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install tox | |
- name: Run tests | |
run: tox |