Generate GitHub Pages Documentation Website #83
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
| name: Unit Testing | |
| on: | |
| push: | |
| # Avoid using all the resources/limits available by checking only | |
| # relevant branches and tags. Other branches can be checked via PRs. | |
| branches: [main] | |
| tags: ["v[0-9]*", "[0-9]+.[0-9]+*"] # Match tags that resemble a version | |
| pull_request: # Run in every PR | |
| workflow_dispatch: # Allow manually triggering the workflow | |
| # schedule: | |
| # # Run roughly every 15 days at 00:00 UTC | |
| # # (useful to check if updates on dependencies break the package) | |
| # - cron: '0 0 1,16 * *' | |
| jobs: | |
| # Define the matrix of platforms and python versions to test on for | |
| # the unit testing jobs below. | |
| # See GitHub how-to on a shared strategy matrix for more info on this solution. | |
| # https://docs.github.com/en/actions/how-tos/write-workflows/choose-what-workflows-do/run-job-variations | |
| define_matrix: | |
| runs-on: "ubuntu-latest" | |
| outputs: | |
| platforms: ${{ steps.platforms.outputs.platforms }} | |
| python: ${{ steps.python.outputs.python }} | |
| steps: | |
| - name: Define platforms to test on | |
| id: platforms | |
| run: | | |
| echo 'platforms=["ubuntu-latest"]' >> "$GITHUB_OUTPUT" | |
| - name: Define Python versions to test on | |
| id: python | |
| run: | | |
| echo 'python=["3.9"]' >> "$GITHUB_OUTPUT" | |
| unit_testing: | |
| needs: define_matrix | |
| strategy: | |
| matrix: | |
| platform: ${{ fromJSON(needs.define_matrix.outputs.platforms) }} | |
| python: ${{ fromJSON(needs.define_matrix.outputs.python) }} | |
| uses: RxnRover/.github/.github/workflows/python_unit_testing_tox_main.yml@main | |
| with: | |
| platform: ${{ matrix.platform }} | |
| python: ${{ matrix.python }} | |
| tox_args: 'run -- -m "not individual"' | |
| individually_run_tests: | |
| needs: [define_matrix, unit_testing] | |
| strategy: | |
| matrix: | |
| platform: ${{ fromJSON(needs.define_matrix.outputs.platforms) }} | |
| python: ${{ fromJSON(needs.define_matrix.outputs.python) }} | |
| tox_args: | |
| [ | |
| "run -- tests/cyrxnopt/test_NestedVenv.py::test_pip_install_numpy_first_of_two_venvs", | |
| "run -- tests/cyrxnopt/test_NestedVenv.py::test_pip_install_numpy_two_versions", | |
| ] | |
| uses: RxnRover/.github/.github/workflows/python_unit_testing_tox_main.yml@main | |
| with: | |
| platform: ${{ matrix.platform }} | |
| python: ${{ matrix.python }} | |
| tox_args: ${{ matrix.tox_args }} |