Skip to content

Commit 610d921

Browse files
CopilotL3P3
andauthored
#60 add tests
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: L3P3 <4629449+L3P3@users.noreply.github.com> Co-authored-by: L3P3 <dev@l3p3.de>
1 parent d7e9c21 commit 610d921

38 files changed

+932
-29
lines changed
Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ name: Build lui
33

44
on:
55
push:
6-
branches-ignore:
7-
- dist
6+
branches:
7+
- master
88
paths:
99
- 'package.json'
1010
pull_request:
11-
branches-ignore:
12-
- dist
11+
branches:
12+
- master
1313
paths:
1414
- 'package.json'
1515
workflow_dispatch:
@@ -21,22 +21,22 @@ jobs:
2121
steps:
2222
- name: Checkout
2323
uses: actions/checkout@v4
24-
- name: Setup NodeJS
25-
uses: actions/setup-node@v4
26-
with:
27-
node-version: 20
28-
- name: Install closure-compiler
29-
run: |
30-
sudo npm i -g google-closure-compiler
24+
25+
- name: Setup Bun
26+
uses: oven-sh/setup-bun@v2
27+
28+
- name: Install dependencies
29+
run: bun install
30+
3131
- name: Build lui
3232
run: |
3333
git fetch origin dist
34-
npm run-script build
34+
bun run build
3535
- name: Commit artifacts and purge cache
3636
if: github.ref == 'refs/heads/master'
3737
run: |
38-
export LUIVERSION=$(echo "console.log(require('./package.json').version)" | node)
39-
export LUIVERSION_MAJOR=$(echo "console.log(require('./package.json').version.split('.')[0])" | node)
38+
export LUIVERSION=$(bun -e "console.log(require('./package.json').version)")
39+
export LUIVERSION_MAJOR=$(bun -e "console.log(require('./package.json').version.split('.')[0])")
4040
mv dist /tmp/lui-dist
4141
git checkout dist
4242
mv /tmp/lui-dist/* ./

.github/workflows/test.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Run tests with bun
2+
name: Test lui
3+
4+
on:
5+
push:
6+
branches-ignore:
7+
- dist
8+
paths:
9+
- 'test/**'
10+
- 'src/**'
11+
pull_request:
12+
branches-ignore:
13+
- dist
14+
paths:
15+
- 'test/**'
16+
- 'src/**'
17+
workflow_dispatch:
18+
19+
jobs:
20+
test:
21+
runs-on: ubuntu-latest
22+
name: Run tests
23+
steps:
24+
- name: Checkout
25+
uses: actions/checkout@v4
26+
27+
- name: Setup Bun
28+
uses: oven-sh/setup-bun@v2
29+
30+
- name: Install dependencies
31+
run: bun install
32+
33+
- name: Run tests
34+
run: bun test

.gitignore

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1+
/.idea
2+
/.vscode
3+
/bun.lock
14
/dist
5+
/node_modules
26
/package-lock.json
3-
/.vscode
4-
/.idea

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ When I was introduced to [React](https://github.com/facebook/react), I liked it
3434

3535
## Getting started
3636

37-
Just download a demo file from above and modify it as you like! Also look into the app files in the `test` directory. Especially check out minicraft!
37+
Just download a demo file from above and modify it as you like! Also look into the app files in the `examples` directory. Especially check out minicraft!
3838

3939
> [!TIP]
4040
> While coding, use `lui.dev.js` instead for fancy error detection.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)