-
Notifications
You must be signed in to change notification settings - Fork 5
68 lines (60 loc) · 2.47 KB
/
Copy pathtest.yml
File metadata and controls
68 lines (60 loc) · 2.47 KB
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
63
64
65
66
67
68
name: Tests
on:
pull_request:
branches: [main]
push:
branches: [main]
release:
types: [published, prereleased]
jobs:
test:
runs-on: macos-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Checkout Valdi
uses: actions/checkout@v4
with:
repository: Snapchat/Valdi
ref: beta-0.1.0
lfs: true
path: .valdi
- name: Patch for CI (local Valdi checkout)
run: |
VALDI=${{ github.workspace }}/.valdi
# Remove root-module-only llvm extension from Valdi's MODULE.bazel
sed -i '' '/^llvm = use_extension/d; /^llvm\.toolchain/d; /^use_repo(llvm/d; /^register_toolchains("@llvm_toolchain/d' .valdi/MODULE.bazel
# Point .bazelrc registry at local Valdi checkout (release tag may not exist yet)
sed -i '' "s|--registry=https://raw.githubusercontent.com/Snapchat/Valdi/.*/registry|--registry=file://$VALDI/registry|" .bazelrc
# Stub out open_source_archives.bzl (stripped by Copybara, not on public repo)
echo 'ARCHIVES = {}' > .valdi/bzl/open_source_archives.bzl
- name: Setup Bazel
uses: bazel-contrib/setup-bazel@0.8.5
with:
bazelisk-cache: true
disk-cache: ${{ github.workflow }}
repository-cache: true
- name: Run all tests
run: |
VALDI=${{ github.workspace }}/.valdi
bazel test --test_output=all \
--override_module=valdi=$VALDI \
--override_module=android_macros=$VALDI/bzl/macros \
--override_module=snap_macros=$VALDI/bzl/valdi/snap_macros \
--override_module=snap_client_toolchains=$VALDI/bzl/toolchains \
--override_module=snap_platforms=$VALDI/bzl/platforms \
--override_module=skia_user_config=$VALDI/third-party/skia_user_config \
--override_module=rules_hdrs=$VALDI/third-party/rules_hdrs \
--override_module=valdi_toolchain=$VALDI/bin \
--override_module=resvg_libs=$VALDI/third-party/resvg/resvg_libs \
//valdi_modules/widgets:test \
//valdi_modules/navigation:test \
//valdi_modules/valdi_standalone_ui:test \
//valdi_modules/navigation_internal:test \
//valdi_modules/playground:test
- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: test-results
path: bazel-testlogs/