-
Notifications
You must be signed in to change notification settings - Fork 54
45 lines (37 loc) · 1.14 KB
/
test.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
name: Test
on: [push]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
node-version: [18.x, 20.x, 22.x]
steps:
- name: Use Node.js ${{ matrix.node-version }} on ${{ matrix.os }}
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'adopt'
- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: bun install
- name: Run tests
run: bun run ci
- run: |
if [ "$RUNNER_OS" == "Linux" ]; then
curl -Os https://uploader.codecov.io/latest/linux/codecov && chmod +x codecov
for dir in packages/*; do
./codecov --dir "${dir}" --flags "$(basename "${dir}")" --token "${CODECOV_TOKEN}" --verbose
done
fi
shell: bash
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}