ci: Resolve Zizmor static security audit findings in workflows and composite actions #54
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: Test ml-metadata with Conda | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| branches: | |
| - master | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| python-version: ["3.10", "3.11", "3.12", "3.13"] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| persist-credentials: false | |
| - name: Setup Micromamba | |
| uses: mamba-org/setup-micromamba@4b9113af4fba0e9e1124b252dd6497a419e7396d # v1.11.0 | |
| with: | |
| environment-file: ${{ matrix.os == 'macos-latest' && 'ci/environment-macos.yml' || 'ci/environment.yml' }} | |
| cache-environment: true | |
| create-args: >- | |
| python=${{ matrix.python-version }} | |
| - name: Display environment info | |
| shell: bash -l {0} | |
| run: | | |
| micromamba info | |
| micromamba list | |
| - name: Install Bazel | |
| shell: bash -l {0} | |
| run: | | |
| # Install Bazelisk (manages Bazel versions) | |
| if [ "$RUNNER_OS" == "Linux" ]; then | |
| curl -Lo /tmp/bazelisk https://github.com/bazelbuild/bazelisk/releases/download/v1.20.0/bazelisk-linux-amd64 | |
| elif [ "$RUNNER_OS" == "macOS" ]; then | |
| curl -Lo /tmp/bazelisk https://github.com/bazelbuild/bazelisk/releases/download/v1.20.0/bazelisk-darwin-amd64 | |
| fi | |
| chmod +x /tmp/bazelisk | |
| sudo mv /tmp/bazelisk /usr/local/bin/bazel | |
| echo "USE_BAZEL_VERSION=7.7.0" >> $GITHUB_ENV | |
| bazel --version | |
| - name: Build the package | |
| shell: bash -l {0} | |
| run: | | |
| rm -rf build build_mlmd_tmp dist | |
| python setup.py bdist_wheel | |
| - name: Install built wheel | |
| shell: bash -l {0} | |
| run: | | |
| pip install dist/*.whl | |
| - name: Run tests | |
| shell: bash -l {0} | |
| run: | | |
| # cleanup (interferes with tests) | |
| rm -rf bazel-* | |
| # run tests | |
| pytest -vv |