-
Notifications
You must be signed in to change notification settings - Fork 1
62 lines (51 loc) · 1.54 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: Test examples
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
test_main:
runs-on: ubuntu-latest
env:
BAZELISK_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
- name: Test
run: bazelisk test //...
- name: Upload test logs
if: always()
uses: actions/upload-artifact@v4
with:
name: testlogs
# https://github.com/actions/upload-artifact/issues/92#issuecomment-711107236
path: |
${{ github.workspace }}/bazel-testlogs*/**/test.log
test_examples:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
bazel: [7.x, 8.0.0rc2, 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
# Build first because the tests rely on convenience symlinks.
run: bazelisk build //... && 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