Propagate RunEnvironmentInfo #263
Workflow file for this run
This file contains 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, workflow_dispatch] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
env: | |
USE_BAZEL_VERSION: ${{ matrix.bazel-version }} | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11"] | |
bazel-version: ["5.x", "6.x", "latest"] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/cache@v3 | |
with: | |
path: "~/.cache/bazelisk\n~/.cache/bazel\n" | |
key: py${{ matrix.python-version }}-bazel-${{ matrix.bazel-version }}-cache-${{ github.run_id }} | |
restore-keys: py${{ matrix.python-version }}-bazel-${{ matrix.bazel-version }}-cache- | |
- name: Set things up for the Python version to be used | |
run: | | |
TO_REPLACE='python_version = "3.11"' | |
REPLACE_WITH='python_version = "${{ matrix.python-version }}"' | |
grep -q "${TO_REPLACE}" WORKSPACE | |
sed --in-place "s/${TO_REPLACE}/${REPLACE_WITH}/" WORKSPACE | |
bazel run //:requirements.update | |
- name: Run tests | |
run: bazel test --test_env=NO_CLEANUP=1 //... | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/cache@v3 | |
with: | |
path: "~/.cache\n~/.mypy_cache\n~/go\n" | |
key: lint-${{ github.run_id }} | |
restore-keys: lint- | |
- run: go install github.com/bazelbuild/buildtools/buildifier@latest | |
- run: ~/go/bin/buildifier --lint=warn --mode=check -warnings all -v -r . | |
- uses: actions/setup-node@v3 | |
- uses: xt0rted/markdownlint-problem-matcher@v2 | |
- run: npm install -g markdownlint-cli | |
- run: markdownlint . | |
- run: pip install -U yamllint | |
- run: yamllint --strict . | |
- run: mkdir -p .mypy_cache | |
- run: bazel build @rules_python//python/runfiles | |
- uses: lalten/python-lint-annotate@master | |
with: | |
python-version: 3.11 |