Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 30 additions & 21 deletions .github/workflows/preview.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Preview Changes

on:
pull_request:
branches:
Expand All @@ -19,43 +20,51 @@ jobs:
name: Test core
runs-on: ubuntu-latest
steps:
# Checkout repo
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2.2.4
with:
version: 8
run_install: |
- args: [--no-frozen-lockfile]

# Setup Node.js
- uses: actions/setup-node@v3
with:
node-version: 18.x
cache: pnpm

# Force Install pnpm
- uses: pnpm/action-setup@v2
with:
version: 8
run_install: true
run_install_args: "--no-frozen-lockfile"

# Setup Python
- uses: actions/setup-python@v4
with:
python-version: "3.11"
python-version: 3.11

# Mount Bazel cache
- name: Mount bazel caches
uses: actions/cache@v3
with:
path: |
"~/.cache/bazel"
~/.cache/bazel
key: bazel-cache-${{ hashFiles('**/BUILD.bazel', '**/*.bzl', 'WORKSPACE', '**/*.cpp', '**/*.h', '**/*.rs') }}
restore-keys: bazel-cache-

# Setup Bazelisk
- uses: bazelbuild/setup-bazelisk@v2
- name: Test lib
run: |
bazelisk test //libs/core/test

# Run Bazel tests
- name: Test core
run: bazelisk test //libs/core/test

- name: Test std
run: |
bazelisk test //libs/std/test
run: bazelisk test //libs/std/test

- name: Test api
run: |
bazelisk test //libs/api/test
- name: Test finance
run: |
bazelisk test //libs/finance/test
run: bazelisk test //libs/api/test

- name: Test python
run: |
# use legacy python toolchain until rules_python is adopted
bazel test --incompatible_use_python_toolchains=false --python_path=$(which python) //libs/wrappers/python:rtbot_test

- name: Test javascript
run: |
bazelisk test //libs/wrappers/javascript:test
run: bazelisk test //libs/wrappers/javascript:test
Loading
Loading