name: Bazel CI on: # Trigger the workflow on push or pull request, # but only for the master branch push: branches: - master pull_request: jobs: build: name: Bazel runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/master' - uses: actions/cache@v2 name: Cache Bazel artifacts with: path: | .bazel-cache tmp/bazel-repo key: ${{ runner.os }}-bazel-${{ hashFiles('{WORKSPACE,.bazelrc}') }}-${{ hashFiles('**/*.{bazel,bzl}') }}-${{ hashFiles('semantic-*/**/*.hs') }} restore-keys: | ${{ runner.os }}-bazel-${{ hashFiles('{WORKSPACE,.bazelrc}') }}-${{ hashFiles('**/*.{bazel,bzl}') }}- ${{ runner.os }}-bazel-${{ hashFiles('{WORKSPACE,.bazelrc}') }}- ${{ runner.os }}-bazel- - name: Build & test run: | bazel build --config=ci //semantic:all bazel test --config=ci --test_tag_filters=language-test //... bazel test --config=ci //semantic-source //semantic:spec