[feature/OPT-928] to dev #423
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
# This workflow will install Python, StarLeft dependencies and then run StarLeft tests in several scenarios. | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | |
name: Full Startleft automated testing | |
on: [pull_request] | |
permissions: | |
contents: read | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ ubuntu-latest, windows-latest ] | |
python-version: [ "3.8", "3.9", "3.10", "3.11" ] | |
steps: | |
- name: Checkout the project from Git | |
uses: actions/checkout@v3 | |
- name: Get history and tags for SCM versioning to work | |
run: | | |
git fetch --prune --unshallow | |
git fetch --depth=1 origin +refs/tags/*:refs/tags/* | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Update pip version to 23.0.1 | |
run: python -m pip install --upgrade pip==23.0.1 | |
- name: Setup Graphviz | |
uses: ts-graphviz/setup-graphviz@55fcdfa9328aed658432c22011bec2873cd8e69f # v1 | |
- name: Configure Graphviz in Windows | |
if: runner.os == 'Windows' | |
shell: bash | |
run: | | |
pip install --global-option=build_ext --global-option="-IC:\Program files\Graphviz\include" --global-option="-LC:\Program files\Graphviz\lib" pygraphviz==1.10 | |
echo "C:\Program Files\Graphviz\bin" >> $GITHUB_PATH | |
- name: Install dependencies | |
run: pip install -e ".[setup,test]" | |
# This step MUST be after the general installation of StartLeft | |
- name: Install libmagic in Windows | |
if: runner.os == 'Windows' | |
run: pip install python-magic-bin | |
- name: Test with pytest | |
run: python run_tests.py --log-level debug |