Updated libraries #913
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
| name: Test index.json generation | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| push: | |
| branches: | |
| - master | |
| jobs: | |
| unit-tests: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ['3.13'] | |
| omc-version: ['stable'] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: "Set up OpenModelica Compiler" | |
| uses: OpenModelica/setup-openmodelica@v1.0 | |
| with: | |
| version: ${{ matrix.omc-version }} | |
| packages: | | |
| omc | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: 'pip' | |
| - name: Install Dependencies | |
| run: | | |
| pip install -r requirements.txt | |
| - name: Run unit tests | |
| env: | |
| GITHUB_AUTH: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| python -m unittest discover -s tests | |
| test-generate: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| strategy: | |
| matrix: | |
| python-version: ['3.10'] | |
| omc-version: ['stable'] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: "Set up OpenModelica Compiler" | |
| uses: OpenModelica/setup-openmodelica@v1.0 | |
| with: | |
| version: ${{ matrix.omc-version }} | |
| packages: | | |
| omc | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: 'pip' | |
| - name: Install Dependencies | |
| run: | | |
| pip install -r requirements.txt | |
| - name: Generate package index | |
| env: | |
| GITHUB_AUTH: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| test -f rawdata.json | |
| python -m ompackagemanager updateinfo | |
| python -m ompackagemanager genindex | |
| - name: Upload package index | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: packageIndex | |
| if-no-files-found: error | |
| path: | | |
| rawdata.json | |
| index.json |