Add Julia discipline integration #159
Workflow file for this run
This file contains hidden or 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 dependencies, run tests and lint with a variety of Python versions | |
| # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
| name: Unit and Integration Tests | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - develop | |
| - support/* | |
| - release/* | |
| pull_request: | |
| branches: | |
| - main | |
| - develop | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.9", "3.10", "3.11", "3.12"] | |
| steps: | |
| - uses: actions/checkout@main | |
| with: | |
| submodules: recursive | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v2 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Set up Julia | |
| uses: julia-actions/setup-julia@v2 | |
| with: | |
| version: '1.10' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install flake8 coverage[toml] grpcio grpcio-tools protoletariat numpy scipy openmdao | |
| if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
| sudo apt install -y protobuf-compiler | |
| - name: Install Package | |
| run: | | |
| pip install -e ".[julia]" | |
| - name: Install Philote.jl from GitHub | |
| run: | | |
| julia -e 'using Pkg; Pkg.develop(url="https://github.com/MDO-Standards/Philote.jl.git")' | |
| - name: Precompile Philote.jl and verify installation | |
| run: | | |
| julia -e 'using Pkg; Pkg.precompile(); using Philote; println("✓ Philote.jl loaded successfully")' | |
| - name: Lint with flake8 | |
| run: | | |
| # stop the build if there are Python syntax errors or undefined names | |
| flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | |
| # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | |
| flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | |
| - name: Run Unit Tests with Coverage | |
| run: | | |
| python -m coverage run --omit=philote_mdo/generated -m unittest discover -v -s tests -p 'test_*.py' | |
| - name: Upload Test Coverage Report to Codecov | |
| if: ${{ matrix.python-version == '3.12' }} | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| fail_ci_if_error: true # optional (default = false) | |
| # files: ./coverage1.xml,./coverage2.xml # optional | |
| # flags: unittests # optional | |
| # name: codecov-umbrella # optional | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| verbose: true # optional (default = false) |