Merge pull request #21 from compas-dev/copilot/fix-20 #110
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: build | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| build: | |
| if: "!contains(github.event.pull_request.labels.*.name, 'docs-only')" | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| python: ['3.10', '3.11'] | |
| steps: | |
| - uses: compas-dev/compas-actions.build@v4 | |
| with: | |
| python: ${{ matrix.python }} | |
| invoke_lint: true | |
| invoke_test: false | |
| - name: Run unit tests | |
| run: | | |
| pytest tests/unit | |
| build-ironpython: | |
| name: windows-ironpython | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Install dependencies | |
| shell: cmd | |
| run: | | |
| curl -o compas.tar.gz -LJO https://pypi.debian.net/compas/latest | |
| curl -o ironpython-pytest.tar.gz -LJO https://pypi.debian.net/ironpython-pytest/latest | |
| choco install ironpython --version=2.7.8.1 | |
| ipy -X:Frames -m ensurepip | |
| ipy -X:Frames -m pip install --no-deps ironpython-pytest.tar.gz | |
| rem untar and rename, these cannot be installed using ironpip because they not longer have a setup.py | |
| tar -xf compas.tar.gz && for /d %%i in (compas-*) do ren "%%i" compas | |
| - name: Run tests | |
| env: | |
| IRONPYTHONPATH: ./src;./compas/src | |
| run: | | |
| ipy -m pytest tests/unit | |
| integration_tests: | |
| if: "!contains(github.event.pull_request.labels.*.name, 'docs-only')" | |
| runs-on: 'ubuntu-latest' | |
| steps: | |
| - name: Set up docker container | |
| run: | | |
| docker run -d --name nanomq -p 1883:1883 -p 8083:8083 -p 8883:8883 emqx/nanomq:latest | |
| docker ps -a | |
| - uses: compas-dev/compas-actions.build@v4 | |
| with: | |
| python: '3.11' | |
| invoke_lint: false | |
| invoke_test: false | |
| - name: Run integration tests | |
| run: | | |
| pytest tests/integration | |
| - name: Tear down docker container | |
| run: | | |
| docker rm -f nanomq |