Skip to content

Commit

Permalink
Add CI checks
Browse files Browse the repository at this point in the history
  • Loading branch information
fmeum committed May 24, 2024
1 parent e1110c3 commit 050a8ce
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Test examples

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
- cron: '0 0 * * *'

workflow_dispatch:

jobs:

test_externally:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
bazel: [7.x, last_green]
os: [ubuntu-latest, macos-13, macos-latest]
env:
BAZELISK_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v4

- name: Test examples
env:
USE_BAZEL_VERSION: ${{ matrix.bazel }}
working-directory: ./examples
run: bazelisk test //...

- name: Upload test logs
if: always()
uses: actions/upload-artifact@v4
with:
name: testlogs-${{ matrix.bazel}}-${{ matrix.os }}
# https://github.com/actions/upload-artifact/issues/92#issuecomment-711107236
path: |
${{ github.workspace }}/examples/bazel-testlogs*/**/test.log
1 change: 1 addition & 0 deletions examples/.bazelrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
common --tool_java_runtime_version=remotejdk_17
common --test_output=errors

# These settings make it harder for bazel_env to do its job and are here to
# verify it still works.
Expand Down

0 comments on commit 050a8ce

Please sign in to comment.