add tencirpauli docs #893
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, pull_request] | |
| jobs: | |
| tests: | |
| runs-on: ${{ matrix.os }} | |
| name: test | |
| strategy: | |
| matrix: | |
| os: [ubuntu-22.04] # macos-latest disabled as one test randomly fails | |
| python-version: ["3.12"] | |
| fail-fast: false | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: "pip" | |
| - name: install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install --no-cache-dir -r requirements/requirements.txt | |
| pip install --no-cache-dir -r requirements/requirements-extra.txt | |
| pip install --no-cache-dir -r requirements/requirements-dev.txt | |
| pip install --no-cache-dir -r requirements/requirements-types.txt | |
| - name: black linter | |
| run: | | |
| black . --check | |
| - name: mypy checker | |
| run: | | |
| mypy tensorcircuit | |
| - name: pylint checker | |
| run: | | |
| pylint tensorcircuit tests | |
| pylint --recursive=y examples/ | |
| - name: test scripts | |
| run: | | |
| pytest --cov=tensorcircuit --cov-report=xml -svv --benchmark-skip | |
| - name: Upload coverage to Codecov | |
| if: matrix.os == 'ubuntu-22.04' | |
| uses: codecov/codecov-action@v2 | |
| with: | |
| verbose: true | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| - name: setup build | |
| run: | | |
| python3 -m build | |
| minimal-install: | |
| runs-on: ubuntu-22.04 | |
| name: minimal install smoke | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python 3.12 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install package with required dependencies only | |
| run: | | |
| python -m venv "${RUNNER_TEMP}/tensorcircuit-minimal" | |
| "${RUNNER_TEMP}/tensorcircuit-minimal/bin/python" -m pip install --no-cache-dir . | |
| - name: Smoke test installed package | |
| working-directory: /tmp | |
| run: | | |
| "${RUNNER_TEMP}/tensorcircuit-minimal/bin/python" "${GITHUB_WORKSPACE}/.github/workflows/minimal_install_smoke.py" |