mirror of
https://github.com/bazel-contrib/bazel-lib
synced 2024-11-26 13:30:30 +00:00
39 lines
1.1 KiB
YAML
39 lines
1.1 KiB
YAML
name: CI
|
|
|
|
# Controls when the action will run.
|
|
on:
|
|
# Triggers the workflow on push or pull request events but only for the main branch
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
# Allows you to run this workflow manually from the Actions tab
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
test:
|
|
# The type of runner that the job will run on
|
|
runs-on: ubuntu-latest
|
|
|
|
# Steps represent a sequence of tasks that will be executed as part of the job
|
|
steps:
|
|
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
|
- uses: actions/checkout@v2
|
|
- uses: bazelbuild/setup-bazelisk@v1
|
|
- name: Mount bazel action cache
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: "~/.cache/bazel"
|
|
key: bazel
|
|
- name: Mount bazel repo cache
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: "~/.cache/bazel-repo"
|
|
key: bazel-repo
|
|
- name: bazel test //...
|
|
env:
|
|
# Bazelisk will download bazel to here
|
|
XDG_CACHE_HOME: ~/.cache/bazel-repo
|
|
run: bazel --bazelrc=.github/workflows/ci.bazelrc --bazelrc=.bazelrc test //...
|