# Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: Run Bazel tests
on: [push, pull_request]

jobs:
  bazel-versions:
    name: All supported Bazel versions
    strategy:
      matrix:
        # We don’t use the GitHub matrix support for the Emacs toolchain to
        # allow Bazel to cache intermediate results between the test runs.
        bazel: [4.0.0, 4.1.0, 4.2.0, 4.2.1, latest]
        os: [ubuntu-latest, macos-latest]
    runs-on: ${{matrix.os}}
    steps:
      - name: Check out repository
        uses: actions/checkout@v2
      - name: Install Bazelisk
        uses: bazelbuild/setup-bazelisk@v1
      - name: Install xmllint
        run: sudo apt-get install libxml2-utils
        if: runner.os == 'Linux'
      - name: Run Bazel tests
        run: make
        env:
          USE_BAZEL_VERSION: ${{matrix.bazel}}

# Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: Run Bazel tests
on: [push, pull_request]

jobs:
  bazel-versions:
    name: All supported Bazel versions
    strategy:
      matrix:
        # We don’t use the GitHub matrix support for the Emacs toolchain to
        # allow Bazel to cache intermediate results between the test runs.
        bazel: [4.0.0, 4.1.0, 4.2.0, 4.2.1, latest]
        os: [ubuntu-latest, macos-latest]
    runs-on: ${{matrix.os}}
    steps:
      - name: Check out repository
        uses: actions/checkout@v2
      - name: Install Bazelisk
        uses: bazelbuild/setup-bazelisk@v1
      - name: Install APT packages
        run: sudo apt-get install libxml2-utils pylint
        if: runner.os == 'Linux'
      - name: Install Python packages
        run: pip install pytype
      - name: Run Bazel tests
        run: make
        env:
          USE_BAZEL_VERSION: ${{matrix.bazel}}

Install linters on the GitHub runners.
Install linters on the GitHub runners.
