dotbot/dotbot_simulator: rework simulator threads and wheel speed model #758
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: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - '*' | |
| pull_request: | |
| jobs: | |
| test: | |
| name: test (${{ matrix.os }}, python-${{ matrix.python-version }}, node-${{ matrix.node-version }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: | |
| - ubuntu-latest | |
| - macos-latest | |
| - windows-latest | |
| python-version: ["3.12"] | |
| node-version: ["20"] | |
| include: | |
| - os: ubuntu-latest | |
| python-version: "3.11" | |
| node-version: "18" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Set up nodejs ${{ matrix.node-version }} | |
| if: matrix.os == 'ubuntu-latest' | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: Install dependencies | |
| run: python -m pip install --upgrade --requirement tests_requirements.txt | |
| - name: Run tox | |
| run: tox | |
| - name: Check cli | |
| if: matrix.os == 'ubuntu-latest' | |
| run: tox -e cli | |
| - name: Upload coverage to Codecov | |
| if: >- | |
| matrix.python-version == 3.12 && | |
| matrix.node-version == 20 | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| verbose: true | |
| doc: | |
| name: check documentation | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install tox | |
| run: python -m pip install --upgrade --requirement tests_requirements.txt | |
| - name: Build and check documentation | |
| run: tox -e doc | |
| frontend: | |
| name: check frontend | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up nodejs | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| - run: npm install | |
| working-directory: ./dotbot/frontend | |
| # Disable this step for now because the tests are outdated | |
| # - run: npm run test | |
| # working-directory: ./dotbot/frontend | |
| - run: npm run lint | |
| working-directory: ./dotbot/frontend | |
| - run: npm run build | |
| working-directory: ./dotbot/frontend | |
| - name: Upload frontend build | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: frontend | |
| path: ./dotbot/frontend/build | |
| package: | |
| needs: [test, doc, frontend] | |
| name: build source package | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: | |
| - ubuntu-latest | |
| - macos-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade --requirement tests_requirements.txt | |
| - name: Set up nodejs | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| - name: Build package | |
| run: python -m build | |
| - name: Check package | |
| run: twine check dist/* | |
| - name: Upload source package as artifact | |
| if: matrix.os == 'ubuntu-latest' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: sdist | |
| path: ./dist/*.tar.gz | |
| release: | |
| needs: [package] | |
| name: publish release | |
| if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Download sdist | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: sdist | |
| path: ./dist | |
| - name: Check dist/ content | |
| run: ls -lR ./dist | |
| - name: Publish package to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| user: __token__ | |
| password: ${{ secrets.pypi_password }} | |
| - name: Release | |
| uses: ncipollo/release-action@v1 | |
| with: | |
| generateReleaseNotes: true | |
| artifacts: "dist/*.tar.gz,dist/*.whl" | |
| token: ${{ secrets.RELEASE_TOKEN }} |