Updated to use SMQTK-* GitHub workflows #16
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 | |
| # pull_request: | |
| # branches: | |
| # - main | |
| # - release* | |
| # schedule: | |
| # # Nightly run unit tests to check for implicit dependency issues between pull requests. | |
| # - cron: '0 0 * * *' | |
| # # Allows you to run this workflow manually from the Actions tab | |
| # workflow_dispatch: | |
| # defaults: | |
| # run: | |
| # shell: bash | |
| # jobs: | |
| # check_code_formatting: | |
| # name: Check code formatting with pre-commit | |
| # runs-on: ubuntu-latest | |
| # container: python:3.9 | |
| # steps: | |
| # - uses: actions/checkout@v4 | |
| # with: | |
| # fetch-depth: 0 | |
| # - uses: actions/cache@v4 | |
| # id: env-cache | |
| # with: | |
| # path: | | |
| # ~/.cache/pypoetry/virtualenvs/ | |
| # ~/.local | |
| # key: python-3.9-${{ hashFiles('poetry.lock') }} | |
| # - name: Setup Environment | |
| # uses: ./.github/actions/python-poetry-setup | |
| # - name: Configure Git safe directory | |
| # run: git config --global --add safe.directory "$GITHUB_WORKSPACE" | |
| # - name: Run pre-commit checks | |
| # run: poetry run pre-commit run --files $(find albumentations -type f) | |
| # check_defaults: | |
| # name: Check defaults in apply | |
| # runs-on: ubuntu-latest | |
| # container: python:3.9 | |
| # steps: | |
| # - uses: actions/checkout@v4 | |
| # with: | |
| # fetch-depth: 0 | |
| # - uses: actions/cache@v4 | |
| # id: env-cache | |
| # with: | |
| # path: | | |
| # ~/.cache/pypoetry/virtualenvs/ | |
| # ~/.local | |
| # ~/.cache/pip | |
| # ~\AppData\Local\pip\Cache | |
| # ~/Library/Caches/pip | |
| # key: python-3.9-${{ hashFiles('poetry.lock') }} | |
| # - name: Setup Environment | |
| # uses: ./.github/actions/python-poetry-setup | |
| # - name: Check defaults in apply | |
| # run: poetry run python -m tools.check_defaults | |
| # check_transforms_docs: | |
| # name: Check transforms documentation is up to date | |
| # runs-on: ubuntu-latest | |
| # container: python:3.9 | |
| # steps: | |
| # - uses: actions/checkout@v4 | |
| # with: | |
| # fetch-depth: 0 | |
| # - uses: actions/cache@v4 | |
| # id: env-cache | |
| # with: | |
| # path: | | |
| # ~/.cache/pypoetry/virtualenvs/ | |
| # ~/.local | |
| # ~/.cache/pip | |
| # ~\AppData\Local\pip\Cache | |
| # ~/Library/Caches/pip | |
| # key: python-3.9-${{ hashFiles('poetry.lock') }} | |
| # - name: Setup Environment | |
| # uses: ./.github/actions/python-poetry-setup | |
| # - name: Run checks for documentation | |
| # run: poetry run python -m tools.make_transforms_docs check README.md | |
| # core: | |
| # name: Core tests (Python ${{ matrix.python-version }}) | |
| # runs-on: ${{ matrix.operating-system }} | |
| # strategy: | |
| # matrix: | |
| # operating-system: [ubuntu-latest, windows-latest, macos-latest] | |
| # python-version: ["3.9", "3.10", "3.11", "3.12"] | |
| # include: | |
| # - operating-system: ubuntu-latest | |
| # path: ~/.cache/pip | |
| # - operating-system: windows-latest | |
| # path: ~\AppData\Local\pip\Cache | |
| # - operating-system: macos-latest | |
| # path: ~/Library/Caches/pip | |
| # fail-fast: false | |
| # container: python:${{ matrix.python-version }} | |
| # steps: | |
| # - name: Checkout | |
| # uses: actions/checkout@v4 | |
| # with: | |
| # fetch-depth: 0 | |
| # - name: Set up Python | |
| # uses: actions/setup-python@v5 | |
| # with: | |
| # python-version: ${{ matrix.python-version }} | |
| # - name: Restore Python cache | |
| # uses: actions/cache/restore@v4 | |
| # with: | |
| # path: | | |
| # ~/.cache/pypoetry/virtualenvs/ | |
| # ~/.local | |
| # ~/.cache/pip | |
| # ~\AppData\Local\pip\Cache | |
| # ~/Library/Caches/pip | |
| # key: python-${{ matrix.python-version }}-${{ hashFiles('poetry.lock') }} | |
| # restore-keys: | | |
| # python-${{ matrix.python-version }}- | |
| # - name: Setup Environment | |
| # uses: ./.github/actions/python-poetry-setup | |
| # - name: Replace OpenCV with Headless | |
| # run: | | |
| # export PIP_LIST="$(poetry run pip list --format=json)" | |
| # if (echo "$PIP_LIST" | poetry run ./scripts/pycv2_is_installed.py) | |
| # then | |
| # echo "OpenCV-Python installed, replacing with equivalent headless version." | |
| # VERSION="$(echo "$PIP_LIST" | poetry run ./scripts/pycv2_installed_version.py)" | |
| # poetry run pip uninstall -y opencv-python opencv-python-headless | |
| # poetry run pip install --no-deps opencv-python-headless=="$VERSION" | |
| # else | |
| # echo "OpenCV-Python NOT installed, skipping." | |
| # fi | |
| # - name: Run Unittests (core) | |
| # run: poetry run pytest | |
| # - name: Save Python cache | |
| # uses: actions/cache/save@v4 | |
| # with: | |
| # path: | | |
| # ~/.cache/pypoetry/virtualenvs/ | |
| # ~/.local | |
| # ~/.cache/pip | |
| # ~\AppData\Local\pip\Cache | |
| # ~/Library/Caches/pip | |
| # key: python-${{ matrix.python-version }}-${{ hashFiles('poetry.lock') }} | |
| # - name: Codecov report submission | |
| # if: github.event_name != 'schedule' | |
| # uses: codecov/codecov-action@v5 | |
| # with: | |
| # token: ${{ secrets.CODECOV_TOKEN || '' }} | |
| # fail_ci_if_error: true | |
| # files: coverage.xml | |
| # flags: unittests | |
| # # extras: | |
| # # name: Extras tests (Python ${{ matrix.python-version }}, ${{ matrix.opt-extra }}) | |
| # # needs: core | |
| # # runs-on: ubuntu-latest | |
| # # strategy: | |
| # # matrix: | |
| # # python-version: ["3.9", "3.10", "3.11", "3.12"] | |
| # # opt-extra: ["hub", "torch", "text"] | |
| # # fail-fast: false | |
| # # container: python:${{ matrix.python-version }} | |
| # # steps: | |
| # # - uses: actions/checkout@v4 | |
| # # with: | |
| # # fetch-depth: 0 | |
| # # - name: Restore Python cache | |
| # # uses: actions/cache/restore@v4 | |
| # # with: | |
| # # path: | | |
| # # ~/.cache/pypoetry/virtualenvs/ | |
| # # ~/.local | |
| # # ~/.cache/pip | |
| # # ~\AppData\Local\pip\Cache | |
| # # ~/Library/Caches/pip | |
| # # key: python-${{ matrix.python-version }}-${{ hashFiles('poetry.lock') }} | |
| # # restore-keys: | | |
| # # python-${{ matrix.python-version }}- | |
| # # - name: Setup Environment | |
| # # uses: ./.github/actions/python-poetry-setup | |
| # # - name: Install extras | |
| # # run: poetry install --extras "${{ matrix.opt-extra }}" | |
| # # - name: Replace OpenCV with Headless | |
| # # run: | | |
| # # export PIP_LIST="$(poetry run pip list --format=json)" | |
| # # if (echo "$PIP_LIST" | poetry run ./scripts/pycv2_is_installed.py) | |
| # # then | |
| # # echo "OpenCV-Python installed, replacing with equivalent headless version." | |
| # # VERSION="$(echo "$PIP_LIST" | poetry run ./scripts/pycv2_installed_version.py)" | |
| # # poetry run pip uninstall -y opencv-python opencv-python-headless | |
| # # poetry run pip install --no-deps opencv-python-headless=="$VERSION" | |
| # # else | |
| # # echo "OpenCV-Python NOT installed, skipping." | |
| # # fi | |
| # # - name: Run Unittests (extras) | |
| # # run: poetry run pytest | |
| # # - name: Codecov report submission | |
| # # if: github.event_name != 'schedule' | |
| # # uses: codecov/codecov-action@v5 | |
| # # with: | |
| # # token: ${{ secrets.CODECOV_TOKEN || '' }} | |
| # # fail_ci_if_error: true | |
| # # files: coverage.xml | |
| # # flags: unittests |