Skip to content

Commit 5767837

Browse files
committed
update gh workflow
1 parent 41efcad commit 5767837

File tree

1 file changed

+27
-23
lines changed

1 file changed

+27
-23
lines changed

.github/workflows/ci.yml

Lines changed: 27 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,30 +4,34 @@ on: [push, pull_request]
44

55
jobs:
66
test:
7-
# virtual environments: https://github.com/actions/virtual-environments
8-
runs-on: ubuntu-20.04
7+
runs-on: ubuntu-latest
98

109
steps:
11-
# Caches and restores the bazelisk download directory, the bazel build directory.
12-
- name: Cache bazel
13-
uses: actions/cache@v2
14-
env:
15-
cache-name: bazel-cache
10+
- name: Checkout code
11+
uses: actions/checkout@v4
12+
13+
- name: Setup Node.js
14+
uses: actions/setup-node@v4
1615
with:
17-
path: |
18-
~/.cache/bazelisk
19-
~/.cache/bazel
20-
key: ${{ runner.os }}-${{ env.cache-name }}-${{ github.ref }}
21-
restore-keys: |
22-
${{ runner.os }}-${{ env.cache-name }}-development
23-
24-
# Checks-out your repository under $GITHUB_WORKSPACE, which is the CWD for
25-
# the rest of the steps
26-
- uses: actions/checkout@v2
27-
28-
# build
29-
- name: Build the code
30-
run: bazel build //...
31-
- name: Run the test
32-
run: bazel test //...
16+
node-version: '24.2.0'
17+
cache: 'npm'
18+
cache-dependency-path: typescript/package-lock.json
19+
20+
- name: Install leetkick globally
21+
run: npm install -g leetkick
22+
23+
- name: Install TypeScript dependencies
24+
run: |
25+
cd typescript
26+
npm ci
27+
28+
- name: Setup C++ build tools
29+
run: |
30+
sudo apt-get update
31+
sudo apt-get install -y build-essential g++
32+
33+
- name: Run TypeScript tests
34+
run: leetkick test --language typescript
3335

36+
- name: Run C++ tests
37+
run: leetkick test --language cpp

0 commit comments

Comments
 (0)