mirror of
https://github.com/github/semantic.git
synced 2024-11-22 23:29:37 +03:00
37 lines
1.1 KiB
YAML
37 lines
1.1 KiB
YAML
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
|